DQ listener stops receiving messages from a reliable sender after destroying and re-creating the listener in the callback.

DQ listener stops receiving messages from a reliable sender after destroying and re-creating the listener in the callback.

book

Article ID: KB0086328

calendar_today

Updated On:

Products Versions
TIBCO Rendezvous -
Not Applicable -

Description

Resolution:
Description:

A DQ listener is used with a reliable message sender. After receiving a few messages, if the DQ listener destroys the listener, goes to sleep and re-creates the listener again inside its callback function, it does not receive the messages from the reliable sender again.

Assume the following three C programs. tibrvdqlisten.c, tibrvcmsend.c and tibrvsend.c.

After receiving 10 messages, tibrvdqlisten.c destroys the listener, goes to sleep for 10 seconds, then re-creates the listener and is expected to consume messages being published on a subscribed to subject.

Both tibrvsend.c, which publishes CM messages, and tibrvcmsend.c, which publishes reliable messages, continuously publish messages in a loop. When tibrvdqlisten.c is used with tibrvcmsend.c, after waking up and re-creating the listener, the tibrvdqlisten is able to pick up all old messages and all new messages that are being published.

However, when tibrvdqlisten is used with tibrvsend, it cannot receive any more messages after waking up, even though a listener is being created. To receive new messages that are continuously being published by tibrvsend, Tibrvdqlisten needs to be restarted.

Environment:

All O/S and H/W Platforms.
All versions of TIBCO Rendezvous

Symptoms:

The DQListener does not receive messages from tibrvsend after waking up, but with cmsender, it does receive messages after waking up.

Cause:

It is illegal to destroy and re-create the listener inside a callback function. Doing so results in erratic behavior.

Resolution:

If the code is changed so that the listener is created and destroyed outside the callback, the application will work as expected both with tibrvsend and cmsender.

Ketwords/Tags
destroy, re-create, listener, callback

Issue/Introduction

DQ listener stops receiving messages from a reliable sender after destroying and re-creating the listener in the callback.