Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendable event not fired after certain amount of messages #405

Open
iam-baju opened this issue Apr 18, 2023 · 1 comment
Open

sendable event not fired after certain amount of messages #405

iam-baju opened this issue Apr 18, 2023 · 1 comment

Comments

@iam-baju
Copy link

Hi team (@grs),
We're sending around 3000 messages in the queue in a very short period of time and we're getting some issues.

For every message that we send, we're creating a new senderLink and listen for sendable event on it.
Once sendable event is fired we send the message and close that senderLink.

Now after certain amount of messages are sent, this sendable event is not fired. I suppose the reason could be the lack of credits. Could you explain from the code snippet below what could be the issue?

image

Also, does it depend on the broker on how many credits to send(I suppose YES) & how can we request more credits.

@iam-baju iam-baju changed the title sendable() event not fired after certain amount of messages sendable event not fired after certain amount of messages Apr 18, 2023
@grs
Copy link
Member

grs commented Apr 18, 2023

There is no way to request credit. It is the broker's responsibility to issue it when it runs out (assuming it has the capacity to accept more messages).

If you are using a sender per message, I would recommend closing the senders once the message is accepted. However if you are only creating a new link in order to be able to vary the target for each message, you can use the Connection.send() method, and set the to field on the message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants