0
votes

I have a Spring Boot 2 application which acts only as a message publisher and another Spring Boot 2 application that acts only as a message consumer.

As each message represents a non-critical, event notification, it is not essential to guarantee that the consumer app receives every message from the producer and so I would like to use the following setup:

  • producer publishes messages to a non-durable topic
  • consumer subscribes to the non-durable topic at start-up and unsubscribes when it closes down

When investigating configuration options I've tried defining the input destination (spring.cloud.stream.bindings.input.destination) both with and without a consumer group with the following results:

  • with consumer group: Capability Mismatch: Router does not support durable endpoint management.

  • without consumer group: Capability Mismatch: Router does not support guaranteed subscriber flows.

The exception with both of these options suggests a durable/guaranteed destination binding which is not what I'm after.

My question is whether the non-durable scenario is supported by the Solace binder for Spring Cloud Stream ?

If not supported by the SCS binder, am I able to achieve what I'm after using Solace JMS instead ?

2

2 Answers

0
votes

As you can see from our website the Solace binder is partner maintained, so I would consider raising an issue directly with them

0
votes

I believe you have two options:

  1. without a consumer group specified the Solace Spring Cloud Streams binder will create a temporary queue that is subscribed to your topic(s) of interest. This is where your SCS app would bind. This queue only exists for the duration of the client session so it will be removed after your app closes down., but while your app is still up the use of the queue gives the added benefit that messages will not be lost during a network bounce, or an HA failover of the broker (if you are configured for HA). Note that because a queue is a guaranteed endpoint in solace your broker & client-profile would need to be configured for assured delivery. Most brokers are now configured for this, but you'd want to ensure your client-profile has the following options checked: "guaranteed endpoint create", "guaranteed message receive", and "guaranteed message send"

  2. If the first option doesn't work for you then you are correct that you can use JMS to create a topic subscription. A few options here as well - you can either use Solace's Spring Boot Autoconfig which you can find here: https://github.com/SolaceProducts/solace-jms-spring-boot or if you prefer to create your own JMS artifacts an example for how to do that can be found in the "Receiving a message" section here: https://solace.com/samples/solace-samples-jms/publish-subscribe/