Hi All,
I subscribe by STOMP to a queue with ack mode 'client-individual' and I try to nack received messages to test the redelivery of the nacked message. It works correctly and the subscribe receive the same message again (message with body 'Test1') and the broker waiting for the ack for the message redelivered:
conn.send(body='Test1', destination='/queue/versamenti', headers={'persistent': True})
INFO:stomp.py:Sending frame ['SEND', '\n', 'destination:/queue/versamenti\n', 'persistent:True\n', '\n', 'Test1', '\x00']
conn.subscribe(destination='/queue/versamenti', id=1, ack='client-individual')
INFO:stomp.py:Sending frame ['SUBSCRIBE', '\n', 'ack:client-individual\n', 'destination:/queue/versamenti\n', 'id:1\n', '\n', '\x00']
INFO:stomp.py:Received frame: 'MESSAGE', headers={'message-id': 'T_1@@session-SLLlG4GtwazK6-ySQlOtpA@@1', 'content-length': '5', 'destination': '/queue/versamenti', 'subscription': '1'}, body='Test1'
conn.nack(id='T_1@@session-SLLlG4GtwazK6-ySQlOtpA@@1', subscription=1)
INFO:stomp.py:Sending frame ['NACK', '\n', 'message-id:T_1@@session-SLLlG4GtwazK6-ySQlOtpA@@1\n', 'subscription:1\n', '\n', '\x00']
INFO:stomp.py:Received frame: 'MESSAGE', headers={'message-id': 'T_1@@session-SLLlG4GtwazK6-ySQlOtpA@@2', 'content-length': '5', 'destination': '/queue/versamenti', 'subscription': '1'}, body='Test1'
This is the behavior that I expect also if I miss the redelivered flag in the redelivered message.
At this point, if I send the same nack again (message-id: 'T_1@@session-SLLlG4GtwazK6-ySQlOtpA@@1'), I correctly don't have the redelivery of the message currently in unacked state (message-id: 'T_1@@session-SLLlG4GtwazK6-ySQlOtpA@@2'), but this message on the broker queue goes from the unacked state to ready state without redelivery to the subscriber:
conn.nack(id='T_1@@session-SLLlG4GtwazK6-ySQlOtpA@@1', subscription=1)
INFO:stomp.py:Sending frame ['NACK', '\n', 'message-id:T_1@@session-SLLlG4GtwazK6-ySQlOtpA@@1\n', 'subscription:1\n', '\n', '\x00']
I feel I don't understand something.
Thank you for the support,
Best regards.