🎄 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.

Two or more consumers for different topics

murillocg
murillocg Member Posts: 11
edited October 2022 in PubSub+ Event Broker #1

Here in this question, I managed to solve the queue issue: Two or more consumers for different queues

Now, the following question remains:

In the same application, I need to process non-persistent messages, which are sent to different topics and have different formats: 1) update-certificate; 2) update-credentials;

In this case, I should also use the FlowReceiver and create two objects, but using a Topic instead of a Queue in consumerFlowProperties.setEndpoint()? Or create one XMLMessageListener and create some logic to split two different messaging processors?

Tagged:

Answers

  • TomF
    TomF Member, Employee Posts: 412 Solace Employee

    Hi @murillocg,

    Queues are generally for receiving persistent messages. If you need to receive direct/non-persistent messages, create a subscription to each of the topics you want. The non-persistent messages will then be received on your session callback. You need to interrogate the topic the message was received on to work out whether it's an update-certificate or update-credentials.