How to implement the Nack for solace message in go language?

Mastan
Mastan Member Posts: 5

As of now I can see for a Persistent receiver there is ack call on specific message but not able to view any specific implementation for Nack in go language.

The Nack is required for me to do requeue and discard a solace message.

could you please suggest on it or provide me solution for it.

Answers

  • murat
    murat Member, Employee Posts: 28 Solace Employee

    Hi @Mastan ,

    The ability to NACK messages will be available with the next release of our Go API which is tentatively scheduled for release sometime this month. I will update you on this thread once that release is available.

    Cheers,

    MV

  • Mastan
    Mastan Member Posts: 5

    Thanks for update..

    Can we call C native API's from go lang code and achieve NACK functionality.?

    using this:

    solClient_flow_settleMsg (solClient_opaqueFlow_pt,solClient_msgId_t,solClient_msgOutcome_t)

    Suggestions and sample implementation if you have please provide me.

    Regards,
    Mastan

  • murat
    murat Member, Employee Posts: 28 Solace Employee

    Hi @Mastan,

    I'm happy to say that as of version 1.8.0 of our Go API, it now supports the NACK functionality.

    Latest version of the API can be sourced from here:

    https://github.com/SolaceProducts/pubsubplus-go-client/releases.

    The documentation around the usage of this feature can be found here:

    https://docs.solace.com/API/API-Developer-Guide-Go/Go-PM-Subscribe.htm?Highlight=NACKs%20Go#negative-acknowledgments-for-specific-messages

    Thank you,

    MV

  • Mastan
    Mastan Member Posts: 5

    Thanks for update..

    Could you please provide inputs how to handle redelivery with intervals and max redelivery attemps if are using below for creating PersistentReceiver

    config.PersistentReceiverFailedOutcome
    

  • Mastan
    Mastan Member Posts: 5

    Is the redelivery count is being maintained for reciever level or queue level?.Could you please help on it,how we can manage if mutiple receivers are available for a queue and redeliver of a message can be implemented.

    As I can see from one receiver with nack if redelivering a message it is moving to another receivers and still the redelivery count is one.And further the message moved to unacknowledged.If this is the case it is not reaching to maxdeliverycount and not moved DMQ as expected.

    Thoughts on it please..

    Thanks

    Mastan

  • hankspencer
    hankspencer Member, Employee Posts: 3 Solace Employee

    Hi @Mastan ,

    Redelivery is maintained at the queue level.

    Can you confirm that the receivers are connecting to a single non-exclusive queue and that the queue Redelivery setting Try Forever is set to false? Can you also confirm that the messages are DMQ eligible?

  • Mastan
    Mastan Member Posts: 5

    Thanks for update. Currently facing issue with message redelivery with deplay. I am getting at the receiver.start() ,error while creating receiver flow: Redelivery delay support required.

    Could you please guide on it and any samples please share.

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 972 admin
    edited 2:33PM #9

    @Mastan

    Are you trying to use the delayed redelivery feature? If yes, it is not supported in the Go API (feature support in this table) so that could be the issue.

    https://docs.solace.com/API/API-Developer-Guide/Delayed-Redelivery.htm?Highlight=Delayed%20Redelivery

    Note that this does not prevent the redelivery on a queue from working. It is a separate feature.