Does exactly what I wanted, thanks a lot Justin.

On 26 April 2017 at 22:00, Justin Bertram <jbert...@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.mel...@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
>

Reply via email to