🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Queue and Error Queue provisioning when using Spring Cloud Stream binder for Solace PubSub+
In an Enterprise context, queues and error queues are typically pre-provisioned, and applications simply connect to the queues at runtime to conduct their business.
Solace PubSub+ provides API to provision the queues at runtime. On the same line, Spring Cloud Stream binder for Solace PubSub+ provides facilities to dynamically provision queues via application configuration. If the queues are already present, the application reconnects - if not present, they are created dynamically.
Spring Cloud Stream supports error queues to capture messages not processed in the message handler in a separate queue for reprocessing or further analysis. Solace binder supports provisioning of both queues and error queues via configuration.
Here is an example:
solace: bindings: uppercase-in-0: consumer: queueNameExpression: >- 'CUSTOM-QUEUE' provisionDurableQueue: true errorQueueNameExpression: >- 'ERROR-QUEUE' provisionErrorQueue: true autoBindErrorQueue: true
This will automatically create a queue and an error queue with the specified custom names on startup. Of course, ensure that the specified user's client profile is set with permission to create durable endpoints.
You can find more information about naming your queues in this blog - Custom Name for your Queues when using Spring Cloud Stream Binder for Solace PubSub+.
Hope this helps!