Closed akaNightmare closed 1 year ago
To be fixed in the next release.
@kum-deepak any updates?
I realized there is another way to watch for receipts, which works better with RxStomp and does not suffer from the issue you reported.
Two changes:
const promiseReceipt = (receiptId: string) =>
firstValueFrom(
rxStomp.unhandledReceipts$.pipe(
filter(frame => frame.headers['receipt-id'] === receiptId)
)
);
// ....
// Now publish to the same queue with the receipt request
const publishReceipt = 'publish-receipt';
const promisePublishReceipt = promiseReceipt(publishReceipt);
rxStomp.publish({
destination: queueName,
body: msg,
headers: { receipt: publishReceipt },
});
await promisePublishReceipt;
Try this out. Based on that, I will update the documentation.
thanks. Let's keep it open until the issue will be fixed
Did it work for you?
this is working as expected, thank you.
I just now released @stomp/rx-stomp@2.0.0-beta1. The newly added function is asyncReceipt
Released v2.0.0
Hello.
throws an error
TypeError: Cannot read property 'watchForReceipt' of undefined
of the client is not connectedThanks.