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

Delivery not found on the receive link #397

Open
pascencio opened this issue Mar 31, 2020 · 2 comments
Open

Delivery not found on the receive link #397

pascencio opened this issue Mar 31, 2020 · 2 comments

Comments

@pascencio
Copy link

pascencio commented Mar 31, 2020

Actual Behavior

  1. I have two applications (A and B) running independently
  2. Both use different topics: A-to-B and B-to-A
  3. Both have it's own TopicClient, SubcriptionClient and IMessageHandler.
  4. When both are running and send from A application to B and vice versa, in both I'm getting the error: Delivery not found on the receive link

Expected Behavior

  1. Application B receive the message successfully from A, then response to A successfully.
  2. Application A receive the message successfully from B.

Versions

  • Manjaro Linux Community: 4.19.113
  • Maven package version: 3.1.5

Additional information

Stack Trace from application A:

2020-03-30 18:39:56.703  INFO 83 --- [ol-1-thread-223] c.m.a.servicebus.MessageAndSessionPump   : Completing message with sequence number '20' failed

java.lang.IllegalArgumentException: Delivery not found on the receive link.
   at com.microsoft.azure.servicebus.primitives.CoreMessageReceiver.generateDeliveryNotFoundException(CoreMessageReceiver.java:1177) ~[azure-servicebus-3.1.5.jar!/:na]
   at com.microsoft.azure.servicebus.primitives.CoreMessageReceiver.updateMessageStateAsync(CoreMessageReceiver.java:998) ~[azure-servicebus-3.1.5.jar!/:na]
   at com.microsoft.azure.servicebus.primitives.CoreMessageReceiver.completeMessageAsync(CoreMessageReceiver.java:897) ~[azure-servicebus-3.1.5.jar!/:na]
   at com.microsoft.azure.servicebus.MessageReceiver.lambda$completeAsync$7(MessageReceiver.java:265) ~[azure-servicebus-3.1.5.jar!/:na]
   at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:981) ~[na:1.8.0_171]
   at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2124) ~[na:1.8.0_171]
   at com.microsoft.azure.servicebus.MessageReceiver.completeAsync(MessageReceiver.java:260) ~[azure-servicebus-3.1.5.jar!/:na]
   at com.microsoft.azure.servicebus.MessageReceiver.completeAsync(MessageReceiver.java:253) ~[azure-servicebus-3.1.5.jar!/:na]
   at com.microsoft.azure.servicebus.MessageAndSessionPump.lambda$receiveAndPumpMessage$2(MessageAndSessionPump.java:207) ~[azure-servicebus-3.1.5.jar!/:na]
   at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822) ~[na:1.8.0_171]
   at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:797) ~[na:1.8.0_171]
   at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) ~[na:1.8.0_171]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_171]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_171]
   at java.lang.Thread.run(Thread.java:748)
@pascencio
Copy link
Author

Hi, I tested versión 3.2.0 recently and got the same exception.

@abhikt48
Copy link

I am also getting same error with azure-servicebus:3.3.0 . Please find below sample code to replicate this issue.

public static void receiveMessage() throws InterruptedException, ServiceBusException {
		IMessageReceiver receiver = ClientFactory.createMessageReceiverFromConnectionStringBuilder(new ConnectionStringBuilder(connectionString, QUEUE_NAME), ReceiveMode.PEEKLOCK);;
        Collection<IMessage> receiveBatch = receiver.receiveBatch(2);

        LOGGER.info("toal received message count - '{}' " + receiveBatch.size());

        for (IMessage iMessage : receiveBatch) {
            LOGGER.info("received message body '{}' " + new String(iMessage.getBody()));
            receiver.complete(iMessage.getLockToken());
        }
        
        receiver.close();
    }

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