Message Delivery Count in New Java API

Sreekanth
Sreekanth Member Posts: 13 ✭✭
edited November 2023 in PubSub+ Event Broker #1

I am using New Java API for my implementation. I would like to have a configuration like spring cloud binder eg : maxdeliveryCountforQueue:<number> or One particular Event type max deliverycount. I can see queue we can configure max delivery count and broker is tracking that info. But If I am getting the information in InboundMessage , I can handle redelivery attempts based on EventTypes. (where one queue will be used for different eventTypes)

Answers

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 959 admin

    Hi @Sreekanth,

    I'm a bit confused by your question, can you elaborate one what you are trying to achieve?

    You are correct that you can configure a redelivery count on a queue (or queue template!) When you receive a message in the new java API you can then check if it has been previously delivered by checking to see if it has been "redelivered" as seen at the link below. Does that give you what you need? https://github.com/SolaceSamples/solace-samples-java/blob/main/src/main/java/com/solace/samples/java/patterns/GuaranteedSubscriber.java#L112

  • Sreekanth
    Sreekanth Member Posts: 13 ✭✭

    Hi @marc - Thanks for responding. I know about flag for redelivered. I am thinking like. I have one queue for my consumer may OrderUpdates queue - From there I am getting OrderCreated, OrderUpdated, OrderCanceled events - each event type I need to configure different redeliver counts. So From InboundMessage headers I am getting this info - I will be able to manage this from my application configuration.