Hello, How did you register the bean named `producerAsyncClient` ?
FYI, this is one example of registering the beans in a Quarkus application : https://github.com/apache/camel-quarkus/blob/da04acd1cfd167219d54ea31aaea0c24585fc094/integration-tests/hl7/src/main/java/org/apache/camel/quarkus/component/hl7/it/Hl7Producers.java#L38 <https://github.com/apache/camel-quarkus/blob/da04acd1cfd167219d54ea31aaea0c24585fc094/integration-tests/hl7/src/main/java/org/apache/camel/quarkus/component/hl7/it/Hl7Producers.java#L38> Le lun. 5 juin 2023 à 21:56, Brian <brian.hesselm...@gmail.com> a écrit : > Hi, > > Does anyone have experience using the producerAsyncClient in camel > eventhubs? I've been trying to implement this producer instead of using > connectionstring directly in the camel uri. > > My uri looks like this: > > > "azure-eventhubs:mynamespace/myeventhub?producerAsyncClient=#producerAsyncClient" > > (I also tried using it without mynamespace/myeventhub with the same result) > and the code for the producer like this: > > < > https://camel.zulipchat.com/#narrow/stream/257302-camel-quarkus/topic/problem.20using.20eventhubs.20extension.20with.20producerAsyncClient/near/363754808 > > > > private static final String SERVICE_URI_POSTFIX = "servicebus.windows.net > "; > > EventHubProducerAsyncClient eventHubProducerAsyncClient = new > EventHubClientBuilder() > .credential(getCredential()) > .fullyQualifiedNamespace(eventhubProperties.eventhubNameSpace() > + "." + SERVICE_URI_POSTFIX) > .eventHubName(eventhubProperties.eventhubName()) > .buildAsyncProducerClient(); > context.getRegistry().bind("producerAsyncClient", > eventHubProducerAsyncClient); > > private ClientSecretCredential getCredential() { > return new ClientSecretCredentialBuilder() > .clientId(eventhubProperties.azureClientId()) > .clientSecret(eventhubProperties.azureClientSecret()) > .tenantId(eventhubProperties.azureTenantId()) > .build(); > } > > But the problem I face is that when sending a message it returns this > error: > > 2023-06-05 15:35:28,067 ERROR [rea.cor.pub.Operators] > (reactor-executor-4) Operator called default onErrorDropped: > reactor.core.Exceptions$ErrorCallbackNotImplemented: > com.azure.core.amqp.exception.AmqpException: errorContext[NAMESPACE: > null.servicebus.windows.net. ERROR CONTEXT: N/A] > Caused by: com.azure.core.amqp.exception.AmqpException: > errorContext[NAMESPACE: null.servicebus.windows.net. ERROR CONTEXT: > N/A] > > It seems the namespace is null when sending. > -- Zineb