I want to test the code when ActiveMQ timeout sending ACK to producer.  I set 
ActiveMQConnectionFactory sendTimeout = 0 but the code didn't go to the 
exception case.

Thanks

Rahman

-----Original Message-----
From: Justin Bertram <jbert...@apache.org> 
Sent: Wednesday, October 27, 2021 10:07 AM
To: users@activemq.apache.org
Subject: Re: [EXTERNAL] Re: ActiveMQ classic Producer ACK question

> I couldn't find docs on how to set the timeout in ActiveMQ 5.5.11 config.

I would have expected to find the aforementioned "sendTimeout" parameter 
documented here [1]. However, it's not there. It appears to be undocumented.

> Can I set the producer timeout in the config when ActiveMQ started?

No. It is set on the client's connection URL.

> Can I also set the timeout for ActiveMQ to redeliver the message if 
> the
client doesn't acknowledge?

Redelivery settings are documented here [2].


Justin

[1] 
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Factivemq.apache.org%2Fconnection-configuration-uri&amp;data=04%7C01%7Crahman.gunawan%40nasa.gov%7C2ce16e498356430e664b08d99953267c%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637709404674916883%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=JSPTG9gDtwy0MoHxXmXSyxk1gc72uZJXL7854TaZ7oM%3D&amp;reserved=0
[2] 
https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Factivemq.apache.org%2Fmessage-redelivery-and-dlq-handling.html&amp;data=04%7C01%7Crahman.gunawan%40nasa.gov%7C2ce16e498356430e664b08d99953267c%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C637709404674916883%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=mdJt3jU1sf5nXlty9Y5fpJWa4h0D3jnDku02zabW%2F1c%3D&amp;reserved=0

On Wed, Oct 27, 2021 at 7:07 AM Gunawan, Rahman (HQ-LP013)[BUSINESS INTEGRA, 
INC.] <rahman.guna...@nasa.gov.invalid> wrote:

> I couldn't find docs on how to set the timeout in ActiveMQ 5.5.11 config.
> Can I set the producer timeout in the config when ActiveMQ started?
> Can I also set the timeout for ActiveMQ to redeliver the message if 
> the client doesn't acknowledge?
>
> Thanks
>
> Rahman
>
> -----Original Message-----
> From: Justin Bertram <jbert...@apache.org>
> Sent: Tuesday, October 26, 2021 4:50 PM
> To: users@activemq.apache.org
> Subject: Re: [EXTERNAL] Re: ActiveMQ classic Producer ACK question
>
> It doesn't really matter that you're using Spring JMS. It will use the 
> OpenWire JMS client implementation under the covers.
>
> From what I can see in the code, if sendTimeout is set then the 
> producer will throw a JMSException when the timeout elapses without 
> receiving a response back from the broker. The execution will be 
> blocked until that time.
>
>
> Justin
>
> On Tue, Oct 26, 2021 at 3:32 PM Gunawan, Rahman (HQ-LP013)[BUSINESS 
> INTEGRA, INC.] <rahman.guna...@nasa.gov.invalid> wrote:
>
> > I'm using Spring JMS template.  The code is:
> > try {
> >       jmsTemplate.convertAndSend(Destination, Object);  } catch 
> > (JmsException e) {
> >      //Do Something
> >  }
> >
> > If the connection/port is frozen, will it go to exception case when 
> > it is timeout (default timeout=300ms?)?  The execution will be 
> > blocked until the producer receives ACK, correct?
> >
> > Thanks
> >
> > Rahman
> >
> > -----Original Message-----
> > From: Justin Bertram <jbert...@apache.org>
> > Sent: Tuesday, October 26, 2021 1:45 PM
> > To: users@activemq.apache.org
> > Subject: [EXTERNAL] Re: ActiveMQ classic Producer ACK question
> >
> > Yes. This is done automatically for persistent messages sent from 
> > the OpenWire JMS client. See the documentation [1] for more details.
> >
> >
> > Justin
> >
> > [1]
> > https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fac
> > ti 
> > vemq.apache.org%2Fasync-sends&amp;data=04%7C01%7Crahman.gunawan%40na
> > sa 
> > .gov%7C13b0bdea8eb4418af7ba08d998c251f6%7C7005d45845be48ae8140d43da9
> > 6d 
> > d17b%7C0%7C0%7C637708782637420792%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC
> > 4w 
> > LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sd
> > at
> > a=jwpCkqqR4r0o6i59Z8BPUv2jyrM4%2FeDqW951g0pwvHk%3D&amp;reserved=0
> >
> > On Tue, Oct 26, 2021 at 12:40 PM Gunawan, Rahman (HQ-LP013)[BUSINESS 
> > INTEGRA, INC.] <rahman.guna...@nasa.gov.invalid> wrote:
> >
> > > I'm using ActiveMQ 5.15.11.  Is there a way for producer to 
> > > receive acknowledgement (ACK) from ActiveMQ?  The producer needs 
> > > to know if the message is received by activeMQ in case of activeMQ 
> > > port is hung or bad connection.
> > >
> > > Thanks
> > >
> > > Rahman
> > >
> >
> >
>
>

Reply via email to