-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[QUERY] Service bus Delivery not on receive link error #40111
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
@akshit-mehta-rubrik are you looking into delete all the messages in the queue? We are developing a feature that can delete them in bulk, which is in beta state right now. |
Hi, I have the same problem at the moment. I want to mark messages as complete after successfully processing them. To achieve this, I use the |
Hello @mohjohfox, seeing "delivery not on receive link" means that client’s link (connection) to the Service Bus entity (e.g. queue, topic) was lost by the time application was attempting to complete the message. A message that didn't complete will be redelivered by the service (redelivery attempts will be done for max_delivery_count times configured for the entity). Could you validate this using "ServiceBusProcessorClient" with the current version 7.17.0 to see if experience improves? could you also make sure "prefetch" is not set explicitly when building "ServiceBusProcessorClient" (prefetch - reference). It would be helpful to see how you’re building the processor client (values of the configurations used in the builder) |
@anuchandy is the bulk delete option applicable for deleting some messages from queue (as this is my usecase) ?
For this error i've tried that as well, however that too throwed the "Delivery not on receive link" error |
@anuchandy We are currently using version 7.14.2, I will update the version to 7.17.0 and test it again as you suggested. ServiceBusClientBuilder()
.transportType(AmqpTransportType.AMQP)
.retryOptions(AmqpRetryOptions().apply {
maxRetries = 5
delay = Duration.ofSeconds(2)
maxDelay = Duration.ofMinutes(2)
mode = AmqpRetryMode.EXPONENTIAL
}
)
.connectionString("connectionString")
.processor()
.queueName("queueName")
.maxAutoLockRenewDuration(Duration.ofMinutes(150))
.disableAutoComplete()
.processMessage(
messageProcessor()::processMessage
)
.processError { context: ServiceBusErrorContext ->
log.error(
"Failed to handle message, ${context.errorSource}",
context.exception
)
}
.buildProcessorClient() |
Hi @akshit-mehta-rubrik, you can find details of batch-delete here https://learn.microsoft.com/en-us/azure/service-bus-messaging/batch-delete The feature is in the process of getting ready for GA. Unlike receive-complete, the batch-delete optimized for bulk delete, for example, a single batch-delete API call can delete ~4000 messages. In case of receive-complete, deleting 4000 messages means client needs to receive 4000 messages over network then there will be 4000 individual network calls for complete. So, in your use of deleting 28K messages, the batch delete can do it with ~7 network calls, while receive-complete approach takes 56K network calls, which means the risk of batch-delete being affected by network interruption is very low. |
@anuchandy We updated the version to |
Closing this, reason for the log message provided and updating processor to 7.17.0 resolved the error happening on complete calls |
Query/Question
Trying to complete messages in service bus using ServiceBusReceiverClient and getting error - "Delivery not on receive link". wanted to know the meaning of error, root cause and resolution steps.
Messages received: 28K (500 at a time and 28K/500 total receiveMessage calls)
Messages to be completed: 28K one by one in a loop without custom delay
Message lock duration: 4 minutes
Message auto lock duration: 400 minutes
Expected result: 28K messages deleted from queue
Actual result: 2K messages were deleted and for remaining messages "Delivery not on receive link" error was thrown while completing. The number varies in each error and cannot be confirmed.
Why is this not a Bug or a feature Request?
A clear explanation of why is this not a bug or a feature request?
currently it's not certain that issue is due to SDK or something is missed from my end.
Setup (please complete the following information if applicable):
b) Standard D4asv5 - 16gb, 4 cores, JVM memory: ~8Gb
for simplicity of recreating this error we're just doing service bus receive and delete and no other operation.
Debug logs
Information Checklist
The text was updated successfully, but these errors were encountered: