[BUG] Send message to Service bus queue giving error: Code is available in official Document but still not working #43878
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Bus
Describe the bug
(https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-queues?tabs=connection-string)
Exception or Stack Trace
17:49:22.171 [main] WARN reactor.core.Exceptions -- throwIfFatal detected a jvm fatal exception, which is thrown and logged below:
java.lang.NoSuchMethodError: 'void com.azure.core.amqp.implementation.ReactorConnection.(java.lang.String, com.azure.core.amqp.implementation.ConnectionOptions, com.azure.core.amqp.implementation.ReactorProvider, com.azure.core.amqp.implementation.ReactorHandlerProvider, com.azure.core.amqp.implementation.TokenManagerProvider, com.azure.core.amqp.implementation.MessageSerializer, org.apache.qpid.proton.amqp.transport.SenderSettleMode, org.apache.qpid.proton.amqp.transport.ReceiverSettleMode)'
at com.azure.messaging.servicebus.implementation.ServiceBusReactorAmqpConnection.(ServiceBusReactorAmqpConnection.java:74)
at com.azure.messaging.servicebus.ServiceBusClientBuilder.lambda$getOrCreateConnectionProcessor$0(ServiceBusClientBuilder.java:710)
at reactor.core.publisher.MonoCallable$MonoCallableSubscription.request(MonoCallable.java:137)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2367)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2241)
at reactor.core.publisher.MonoCallable.subscribe(MonoCallable.java:48)
at reactor.core.publisher.FluxRepeatPredicate$RepeatPredicateSubscriber.resubscribe(FluxRepeatPredicate.java:120)
at reactor.core.publisher.MonoRepeatPredicate.subscribeOrReturn(MonoRepeatPredicate.java:48)
at reactor.core.publisher.Flux.subscribe(Flux.java:8833)
at reactor.core.publisher.Flux.subscribeWith(Flux.java:8969)
at com.azure.messaging.servicebus.ServiceBusClientBuilder.getOrCreateConnectionProcessor(ServiceBusClientBuilder.java:715)
at com.azure.messaging.servicebus.ServiceBusClientBuilder.access$700(ServiceBusClientBuilder.java:186)
at com.azure.messaging.servicebus.ServiceBusClientBuilder$ServiceBusSenderClientBuilder.buildAsyncClient(ServiceBusClientBuilder.java:907)
at com.azure.messaging.servicebus.ServiceBusClientBuilder$ServiceBusSenderClientBuilder.buildClient(ServiceBusClientBuilder.java:954)
To Reproduce
Steps to reproduce the behavior:
Code Snippet
final String conn = "myconnectionstring";
final String qu = "comm-event";
@test
public void sendMess(){
String userEvent = "Data test";
Logger.logInfo(String.format("User profile update event : %s", userEvent));
ServiceBusSenderClient senderClient = new ServiceBusClientBuilder()
.connectionString(conn)
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
If you suspect a dependency version mismatch (e.g. you see
NoClassDefFoundError
,NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:mvn dependency:tree -Dverbose
)Additional context
Somewhere I have seen solution around that to add in .transportType(AmqpTransportType.AMQP_WEB_SOCKETS) in new ServiceBusClientBuilder() but still not working
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: