Hello, In camel-amqp component there are tests that uses Artemis amqp https://github.com/apache/camel/blob/main/components/camel-amqp/src/test/java/org/apache/camel/component/amqp/artemis/AMQPEmbeddedBrokerTest.java#L44 and the connection is configured like this https://github.com/apache/camel/blob/main/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPConnectionDetails.java#L64 the AMQPConnectionDetails is later used to configure a org.apache.qpid.jms.JmsConnectionFactory.
If you have a reproducer I am happy to help more. Regards, Federico Il giorno lun 28 ago 2023 alle ore 12:14 Modanese, Riccardo <riccardo.modan...@eurotech.com.invalid> ha scritto: > Hello everyone, > I’m working on supporting in a proper way the Artemis large messages > through Camel streams. > From the documentation it looks like this is supported only using AMQP or > CORE protocol (no JMS). > We use a custom factory since we need to set the connection client ID. > > I set up Camel routes adding streamCache="true" to every route definition > and camel context definition. > I also added the stream cache configuration to each Camel context: > > <camel:streamCaching id="myCacheConfig" bufferSize="16384" enabled="true" > spoolDirectory="/tmp/camel_cache" spoolThreshold="65536"/> > > This configuration didn’t work using this connection factory: > org.apache.qpid.jms.JmsConnectionFactory > with this url: > public ServiceConnectionFactoryImpl(String host, int port, String > username, String password, String clientId) { > super(username, password, "amqp://" + host + ":" + port); > ... > } > It looks like, from my understanding, that this factory is creating a JMS > connection even if I specify the AMQP protocol in the connection url. > But this works (connect and subscribe and receive messages from the > broker) using an Artemis connector with only AMQP protocol set (is the AMQP > protocol acceptor also supporting JMS?) > > Anyway, changing the factory to use CORE protocol routes work fine with > the Camel configuration I set. > org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory > with this url > public ServiceConnectionFactoryImpl(String host, int port, String > username, String password, String clientId) { > super("tcp://" + host + ":" + port, username, password); > ... > } > > What I’m doing wrong? > How can I configure my factory to force AMQP protocol to be used (since > it’ supported with streams and Artemis large messages) > > Any suggestion is appreciated! > > Regards > > Riccardo Modanese >