You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "BrianH85 (via GitHub)" <gi...@apache.org> on 2023/06/09 08:58:04 UTC
[GitHub] [camel-quarkus] BrianH85 opened a new issue, #4975: Issue with producerAsyncClient in camel-quarkus-azure-eventhub - namespace equals null
BrianH85 opened a new issue, #4975:
URL: https://github.com/apache/camel-quarkus/issues/4975
I'm trying to use the eventhub component with a producerAsyncClient. It seems the namespace always starts with null when using the producerAsynClient. When sending a message I get 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](http://null.servicebus.windows.net/). ERROR CONTEXT: N/A]
Caused by: com.azure.core.amqp.exception.AmqpException: errorContext[NAMESPACE: [null.servicebus.windows.net](http://null.servicebus.windows.net/). ERROR CONTEXT: N/A]
```
I am using quarkus bom for my dependencies. I tried both versions 3.0.3.Final (this example) and also 2.16.1.Final. Sample code added below.
main route:
```
package foo.bar.test;
import com.azure.messaging.eventhubs.EventHubProducerAsyncClient;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.azure.eventhubs.EventHubsConstants;
@ApplicationScoped
public class EventhubRoute extends RouteBuilder {
@Inject
CamelContext camelContext;
@Inject
EventHubProducerAsyncClient eventHubProducerAsyncClient;
@Override
public void configure() {
camelContext.getRegistry().bind("client",eventHubProducerAsyncClient);
from("timer://tick?repeatCount=1")
.setBody(constant("TEST MESSAGE"))
.to("azure-eventhubs:?producerAsyncClient=#client");
}
}
```
the eventhub producer class:
```
package foo.bar.test;
import com.azure.identity.ClientSecretCredential;
import com.azure.identity.ClientSecretCredentialBuilder;
import com.azure.messaging.eventhubs.EventHubClientBuilder;
import com.azure.messaging.eventhubs.EventHubProducerAsyncClient;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.inject.Produces;
@ApplicationScoped
public class EventhubProducer {
private static final String SERVICE_URI_POSTFIX = ".servicebus.windows.net";
@Produces
public EventHubProducerAsyncClient createEventHubProducerAsyncClient(){
EventHubProducerAsyncClient eventHubProducerAsyncClient = new EventHubClientBuilder()
.credential(getCredential())
.fullyQualifiedNamespace("mynamespace" + SERVICE_URI_POSTFIX)
.eventHubName("myeventhub")
.buildAsyncProducerClient();
return eventHubProducerAsyncClient;
}
private ClientSecretCredential getCredential() {
return new ClientSecretCredentialBuilder()
.clientId("id")
.clientSecret("secret")
.tenantId("tenant")
.build();
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] zhfeng commented on issue #4975: Issue with producerAsyncClient in camel-quarkus-azure-eventhubs - namespace equals null
Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng commented on issue #4975:
URL: https://github.com/apache/camel-quarkus/issues/4975#issuecomment-1679864625
@jamesnetherton this have been fixed? or anything needs to do in camel-quarkus?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] BrianH85 commented on issue #4975: Issue with producerAsyncClient in camel-quarkus-azure-eventhub - namespace equals null
Posted by "BrianH85 (via GitHub)" <gi...@apache.org>.
BrianH85 commented on issue #4975:
URL: https://github.com/apache/camel-quarkus/issues/4975#issuecomment-1600566391
Looks like it was fixed in the latest apache camel release 3.20.6
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] jamesnetherton commented on issue #4975: Issue with producerAsyncClient in camel-quarkus-azure-eventhubs - namespace equals null
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #4975:
URL: https://github.com/apache/camel-quarkus/issues/4975#issuecomment-1680015850
It was fixed in the Camel /CQ RC2 releases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] jamesnetherton commented on issue #4975: Issue with producerAsyncClient in camel-quarkus-azure-eventhub - namespace equals null
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #4975:
URL: https://github.com/apache/camel-quarkus/issues/4975#issuecomment-1584326628
I think the component is a bit broken. Unless I am missing something, it does not seem possible to use a custom `EventHubProducerAsyncClient` instance.
The producer does not check to see if a client is already available and proceeds to create new instance based on the endpoint configuration:
https://github.com/apache/camel/blob/main/components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/EventHubsProducer.java#L41
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] jamesnetherton commented on issue #4975: Issue with producerAsyncClient in camel-quarkus-azure-eventhub - namespace equals null
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #4975:
URL: https://github.com/apache/camel-quarkus/issues/4975#issuecomment-1584525640
I created a ticket with the Camel project:
https://issues.apache.org/jira/browse/CAMEL-19432
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] jamesnetherton closed issue #4975: Issue with producerAsyncClient in camel-quarkus-azure-eventhubs - namespace equals null
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton closed issue #4975: Issue with producerAsyncClient in camel-quarkus-azure-eventhubs - namespace equals null
URL: https://github.com/apache/camel-quarkus/issues/4975
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org