You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Token is received successfully. Then we are getting ServiceBusException: Cannot create send link from a closed session
Expected Behavior
Expecting message should be able to posted using the azure client asynchronously using ServiceBusSenderAsyncClient .
Sametime message is posted successfully synchronously using blocking client API ServiceBusSenderClient
Exception log attached while connecting servicebus.
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();
Actual Behavior
Expected Behavior
Exception log attached while connecting servicebus.
ASYNCCLIENT_EXCEPTION_LOGS.zip
Please help to resolve the issue.
Versions
The text was updated successfully, but these errors were encountered: