Buffer Chatbot Enhanced โ€“ Trigger icon

Buffer Chatbot Enhanced โ€“ Trigger

ChatBot Enhanced with real-time trigger capabilities for monitoring Redis key changes and session events

Overview

This node acts as a real-time trigger for monitoring Redis key changes and session events, specifically designed for enhanced chatbot interactions. It listens for specified Redis key events such as creation, deletion, expiration, and eviction, and triggers workflows based on these events. This is useful for applications needing immediate responses to Redis data changes, such as chatbots tracking user sessions or cache updates.

Use Case Examples

  1. Monitor specific Redis key patterns like 'chatbot:*' to trigger workflows when relevant keys are updated or deleted.
  2. Track all Redis keys to capture every key event in a development or testing environment (not recommended for production due to performance impact).
  3. Use rate limiting to prevent event storms by controlling the maximum number of events processed per second.

Properties

Name Meaning
Key Monitoring Select how to monitor Redis keys, either all keys or specific key patterns.
Key Pattern The Redis key pattern to monitor, supporting glob patterns like * and ?.
Event Types Select which Redis events (set, del, expired, evicted) should trigger the workflow.
Rate Limiting Enable or disable rate limiting to prevent event storms.
Max Events Per Second Maximum number of events to process per second when rate limiting is enabled.
Advanced Options Additional settings including connection timeout, reconnect attempts, and whether to include event metadata.

Output

JSON

  • eventType - Type of Redis event that triggered the workflow (e.g., set, del, expired, evicted).
  • key - The Redis key involved in the event.
  • value - The value of the key if available, otherwise null.
  • database - The Redis database number where the event occurred.
  • timestamp - Timestamp when the event was triggered.
  • metadata
    • pattern - The key pattern used for monitoring.
    • triggerId - Unique identifier of the trigger node instance.
    • workflowId - Identifier of the workflow being executed.
    • nodeVersion - Version of the node.

Dependencies

  • Redis server

Troubleshooting

  • Invalid key pattern errors occur if the provided Redis key pattern does not conform to expected glob syntax; ensure patterns use *, ?, or ** correctly.
  • Invalid event types error occurs if unsupported event types are selected; choose from set, del, expired, evicted.
  • Connection errors may happen if Redis credentials are incomplete or incorrect; verify host, port, and authentication details.
  • Performance issues can arise when tracking all keys due to high CPU and network usage; prefer specific key patterns in production.
  • Event storms can overload workflows; enable rate limiting and set a reasonable max events per second to mitigate this.

Links

Discussion