activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Mellor <paul.mel...@gmail.com>
Subject Re: Setting client prefetch in Artemis Core API
Date Thu, 27 Apr 2017 19:55:48 GMT
Does exactly what I wanted, thanks a lot Justin.

On 26 April 2017 at 22:00, Justin Bertram <jbertram@apache.org> wrote:

> I think the simplest way is to set it on the URL, e.g.:
>
>   ServerLocator locator = ActiveMQClient.createServerLocator("vm://0?
> consumerWindowSize=1024);
>
>   ClientSessionFactory factory = locator.createSessionFactory();
>   ClientSession session = factory.createSession();
>   session.start();
>
>   ClientConsumer consumer = session.createConsumer("queue");
>
>
> Justin
>
>
> ----- Original Message -----
> From: "Paul Mellor" <paul.mellor@gmail.com>
> To: users@activemq.apache.org
> Sent: Wednesday, April 26, 2017 3:52:23 PM
> Subject: Setting client prefetch in Artemis Core API
>
> Hi,
>
> How do I set the client prefetch when using the Artemis Core API?  I've
> seen examples of setting it in the URL when using the JMS API but couldn't
> find anything that worked for the Core API.
>
> I am creating my client consumer as so:
>
> ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(
>     new TransportConfiguration(InVMConnectorFactory.class.getName())
> );
>
> ClientSessionFactory factory = locator.createSessionFactory();
> ClientSession session = factory.createSession();
> session.start();
>
> ClientConsumer consumer = session.createConsumer("queue");
>
> Thanks in advance
>
> Paul
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message