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

Connecting Servicebus through Async client failed: exception occurred while processing events. java.lang.NullPointerException: uncorrelated channel:0: #491

Open
KaruppaiyanS opened this issue Nov 20, 2022 · 1 comment

Comments

@KaruppaiyanS
Copy link

Actual Behavior

  1. We are using azure client lib \azure-messaging-servicebus\7.12.1\azure-messaging-servicebus-7.12.1.jar to connect with servicebus queue . ClientSecretCredential lib used to get token.
  2. Token is received successfully. Then we are getting ServiceBusException: Cannot create send link from a closed session

Expected Behavior

  1. Expecting message should be able to posted using the azure client asynchronously using ServiceBusSenderAsyncClient .
  2. Sametime message is posted successfully synchronously using blocking client API ServiceBusSenderClient

Exception log attached while connecting servicebus.

ASYNCCLIENT_EXCEPTION_LOGS.zip
Please help to resolve the issue.

Versions

@KaruppaiyanS
Copy link
Author

KaruppaiyanS commented Nov 21, 2022

Hi ,
Any input for this issue. Need further more details.
Here is code snippet:
ServiceBusMessage message = new ServiceBusMessage(BinaryData.fromString(messagetxt));
logger.info("Message to be posted " + messagetxt);

	ClientSecretCredential clientSecretCredential = new ClientSecretCredentialBuilder().clientId(clientID)
			.clientSecret(clientSecret).tenantId(tenantID).build();
			
			ServiceBusSenderAsyncClient sender = new ServiceBusClientBuilder()
	  .credential(fullyQualifiedNamespace,
	  clientSecretCredential).sender().queueName(QUEUE_NAME) .buildAsyncClient();
	  sender.sendMessage(message);	

	sender.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

1 participant