Sorry, I’m a bit confused! To be able to set minLargeMessage should I use *camel-jms*? There’s no other way, right?
My implementation injects a factory into *camel-amqp* endpoint so I supposed to be able to change the connection driver without affecting *camel-amqp* functionalities. But from my understanding I was wrong. With this configuration worked but I couldn’t change the minLargeMessageSize and it’s mandatory to have it configurable in my case. I opted for amqp protocol because thought it’s a preferable choice for an opensource project compared to JMS or CORE. But if there is no other way, as I’m understanding, I need to switch to JMS. I’ll try this way soon! From: Federico Mariani <federico.mariani.1...@gmail.com> Date: Monday, 28 August 2023 at 16:08 To: users@camel.apache.org <users@camel.apache.org> Subject: Re: unable to work with streams + Artemis large messages with AMQP factory I am afraid that in order to use minLargeMessageSize you need to use *camel-jms* component and *artemis-jms-client* as jms implementation, because camel-amqp uses *qpid-jms-client.*If you have some time, you can take a look to camel-jms <https://github.com/apache/camel/tree/main/components/camel-jms> tests and artemis test infra <https://github.com/apache/camel/tree/main/test-infra/camel-test-infra-artemis> Il giorno lun 28 ago 2023 alle ore 15:33 Modanese, Riccardo <riccardo.modan...@eurotech.com.invalid> ha scritto: > Thanks for your reply, I'm going to investigate the links you provided. > > In the meanwhile, I can provide you few links to the code. > The factory I originally used was (amqp???) > > https://github.com/eclipse/kapua/blob/develop/service/client/src/main/java/org/eclipse/kapua/service/client/amqp/ServiceConnectionFactoryImpl.java#L24 > > https://github.com/eclipse/kapua/blob/fix-largeMessages/consumer/telemetry-app/src/main/resources/spring/applicationContext.xml#L48 > > then I changed it to (core): > > https://github.com/eclipse/kapua/blob/fix-largeMessages/service/client/src/main/java/org/eclipse/kapua/service/client/amqp/ServiceConnectionFactoryImpl.java#L24 > > Out of topic since involves Artemis but anyway, just to give you a little > bit more context. > Clients are MQTT. I’m still unable to change the default > minLargeMesaageSize. I tried adding this parameter to all the acceptors and > to the AMQP/CORE factory but doesn’t work. Default value is kept. > > Regards, > > Riccardo > > > From: Federico Mariani <federico.mariani.1...@gmail.com> > Date: Monday, 28 August 2023 at 12:56 > To: users@camel.apache.org <users@camel.apache.org> > Subject: Re: unable to work with streams + Artemis large messages with > AMQP factory > 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 > > >