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 <[email protected]> Date: Monday, 28 August 2023 at 12:56 To: [email protected] <[email protected]> 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 <[email protected]> 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 >
