Open ahrytsiuk opened 1 day ago
EDIT:
I was using a slightly older version of Azure.Messaging.ServiceBus
in my repo. Using the one specified in the example resolves it. 7.18.2
Also having the same issue with the provided docker compose and .NET sample.
Container up and running:
2024-11-20 17:12:42 info: a.F.aFu[0]
2024-11-20 17:12:42 Creating user defined entities for SB Emulator
2024-11-20 17:12:42 info: a.F.aFu[0]
2024-11-20 17:12:42 Creating queue: queue.1
2024-11-20 17:12:42 info: a.F.aFu[0]
2024-11-20 17:12:42 Creating topic: topic.1
2024-11-20 17:12:42 info: a.F.aFu[0]
2024-11-20 17:12:42 Creating subscription subscription.1 for topic: topic.1
2024-11-20 17:12:42 info: a.F.aFu[0]
2024-11-20 17:12:42 Processing filters for subscription subscription.1 for topic: topic.1
2024-11-20 17:12:42 info: a.F.aFu[0]
2024-11-20 17:12:42 Processing filter app-prop-filter-1
2024-11-20 17:12:43 info: a.F.aFu[0]
2024-11-20 17:12:43 Creating subscription subscription.2 for topic: topic.1
2024-11-20 17:12:43 info: a.F.aFu[0]
2024-11-20 17:12:43 Processing filters for subscription subscription.2 for topic: topic.1
2024-11-20 17:12:43 info: a.F.aFu[0]
2024-11-20 17:12:43 Processing filter user-prop-filter-1
2024-11-20 17:12:43 info: a.F.aFu[0]
2024-11-20 17:12:43 Creating subscription subscription.3 for topic: topic.1
2024-11-20 17:12:43 info: a.F.aFu[0]
2024-11-20 17:12:43 Processing filters for subscription subscription.3 for topic: topic.1
2024-11-20 17:12:43 info: a.F.aFu[0]
2024-11-20 17:12:43 Triggering Entity Sync
2024-11-20 17:12:44 info: a.F.aFu[0]
2024-11-20 17:12:44 Entity Sync complete; Operation Result:True
2024-11-20 17:12:44 info: a.F.aFu[0]
2024-11-20 17:12:44 User defined entities created for SB Emulator
2024-11-20 17:12:44 info: a.F.aFO[0]
2024-11-20 17:12:44 Emulator Service is Successfully Up!
.NET error:
Service Bus Emulator .NET Sample
Running Case 1: Send Receive from a Queue
Unhandled exception. Azure.Messaging.ServiceBus.ServiceBusException: No connection could be made because the target machine actively refused it. ErrorCode: ConnectionRefused (ServiceCommunicationProblem). For troubleshooting information, see https://aka.ms/azsdk/net/servicebus/exceptions/troubleshoot.
---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
at Microsoft.Azure.Amqp.ExceptionDispatcher.Throw(Exception exception)
at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.Azure.Amqp.Transport.AmqpTransportInitiator.ConnectAsyncResult.End(IAsyncResult result)
at Microsoft.Azure.Amqp.Transport.AmqpTransportInitiator.<>c.<ConnectAsync>b__17_1(IAsyncResult r)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
@ahrytsiuk do you have any updates from your side?
I am struggling with the exact same issue. Usingspring-cloud-azure-stream-binder-servicebus:5.17.1
.
Must be some sort of limitation of the sdk. I found this issue and from what I understand, it looks like spring-cloud-azure-stream-binder-servicebus
requires TLS for setting up a connection by default and the emulator does not support it to reduce unnecessary overhead.
For me it looks like we have to wait until Azure provides a fix in the sdk for it. @krishankumar95 does that also sound right to you?
@danielproctor31 is this really related? we are talking about connection issues when using the the mentioned spring dependency (Java/Kotlin context). Your log and obviously the .NET error seem to stem from a non-java application.
@talbx The issue is regarding connection to the emulator, which I was also having. As you can see from my edit I resolved that so feel free to ignore my comment. It may help if anyone else runs into the same problem.
@talbx I didn't try to find solution since I created an issue. But it seems you are right that binder library needs to acomodate changes to support emulator.
I run emulator using
docker-compose.yml
provide in the example. And I'm trying to connect to it from Spring application which uses Spring Cloud Streams binder for Azure Service Bus:with the following configuration:
However I get the following error:
Could you please provide an example how to connect to emulator?