The attached custom plugin and java class allows Adeptia to post messages to Redis stream.
Instructions:
1. Place the attached redisStream.class in ServerKernel/CustomClasses folder.
2. Create a new custom plugin (Configure > Extensions > Custom Plugin) and in the script write the following line:
redisStream.postMessage(inputStream, service)
3. The custom plugin picks up the details to connect to Redis from the process flow, you will have to create variables in the process flow which will have the host, port, username, password, and stream name for Redis. Please create the variables as shown in the screenshot:
redis.username
redis.password
redis.host
redis.port
redis.streamName
4. The input to the custom plugin should be JSON. Example: { "Message1": "Adeptia Transaction Executed", "Status code": "101"}. This JSON can come from any activity such as JSON schema, file source, context source, etc.
5. Upon executing the process flow, the JSON message above will be posted to the Redis stream.
Attached is the custom class and the source code for reference.
Comments
0 comments
Please sign in to leave a comment.