You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Vince Cox <VC...@perforce.com> on 2021/05/24 20:42:29 UTC

ActiveMQ multiple JDBC data sources in same configuration

Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.

Thank you.

Vince


This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


ActiveMQ multiple JDBC data sources in same configuration

Posted by Vince Cox <VC...@perforce.com>.
Thank you for that advice Matt. I will find out what version is in use and get them on the lastest.

Vince

On 5/25/21, 11:41 AM, "Matt Pavlovich" <ma...@gmail.com> wrote:

    Vince-

    Check out the lease-locker and JDBC updates in the 5.16.x releases (5.16.2 is latest)?  Many JDBC changes in 5.16.x series.

    Thanks,
    Matt Pavlovich

    > On May 24, 2021, at 9:21 PM, Vince Cox <VC...@perforce.com> wrote:
    >
    > Matt,
    >
    > We have not noticed any locking. Data server from the DB just fine. But, the leased locker functionality seems to fail over errantly while using the pool.
    >
    > I will see if I can get them to open a Jira against this.
    >
    > Thank you.
    >
    > Vince
    >
    > Get Outlook for iOS<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&amp;data=04%7C01%7CVCox%40perforce.com%7C032691576ac641c5737b08d91f939410%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575540985767827%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=sNM5Yg0zeqRyZc6sHqPF%2BUgYz3ZEd1OQ4N4D%2B6I3bho%3D&amp;reserved=0>
    > ________________________________
    > From: Matt Pavlovich <ma...@gmail.com>
    > Sent: Monday, May 24, 2021 9:20:41 PM
    > To: users@activemq.apache.org <us...@activemq.apache.org>
    > Subject: Re: ActiveMQ multiple JDBC data sources in same configuration
    >
    > Hey  Vince,
    >
    > Most likely DB tuning and/or connection lifecycle coordination b/w the connection factory used by ActiveMQ and the database instance. Can’t rule out a bad or flaky database either. If the customer is struggling with keeping the connection pool tuned and consistent, adding more systems is going to increase the surface area for troubleshooting.
    >
    > Have them open a JIRA and share what they can on the connection settings. Also, they’ll need to coordinate with their DB team to provide some indication as to why the locking is occurring from the DB point of view.
    >
    > Thanks,
    > Matt Pavlovich
    >
    >> On May 24, 2021, at 7:19 PM, Vince Cox <VC...@perforce.com> wrote:
    >>
    >> Thanks for replying so quickly Matt.
    >>
    >> Customer is not having and issue with the data in the DB. The issue shows itself when ActiveMQ randomly has failover events when the lock is in the DB. It’s using the same connection pool as the store. Seems to be some type of contention and master slave pair fails over.
    >>
    >> Vince
    >>
    >> Get Outlook for iOS<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&amp;data=04%7C01%7CVCox%40perforce.com%7C032691576ac641c5737b08d91f939410%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575540985767827%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=sNM5Yg0zeqRyZc6sHqPF%2BUgYz3ZEd1OQ4N4D%2B6I3bho%3D&amp;reserved=0>
    >> ________________________________
    >> From: Matt Pavlovich <ma...@gmail.com>
    >> Sent: Monday, May 24, 2021 7:43:54 PM
    >> To: users@activemq.apache.org <us...@activemq.apache.org>
    >> Subject: Re: ActiveMQ multiple JDBC data sources in same configuration
    >>
    >> Hello Vince-
    >>
    >> Are you able to detail out the use case and rationale for separating the data store from the locker? On the surface that sounds like creating an extra runtime coupling with a distributed system— generally that approach creates more aggregate downtime.
    >>
    >> Thanks,
    >> Matt Pavlovich
    >>
    >>> On May 24, 2021, at 3:42 PM, Vince Cox <VC...@perforce.com> wrote:
    >>>
    >>> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
    >>>
    >>> Thank you.
    >>>
    >>> Vince
    >>>
    >>>
    >>> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
    >>>
    >>
    >>
    >>
    >> CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
    >>
    >>
    >> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
    >>
    >
    >
    >
    > CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
    >
    >
    > This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
    >



    CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.


This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Matt Pavlovich <ma...@gmail.com>.
Vince-

Check out the lease-locker and JDBC updates in the 5.16.x releases (5.16.2 is latest)?  Many JDBC changes in 5.16.x series.

Thanks,
Matt Pavlovich

> On May 24, 2021, at 9:21 PM, Vince Cox <VC...@perforce.com> wrote:
> 
> Matt,
> 
> We have not noticed any locking. Data server from the DB just fine. But, the leased locker functionality seems to fail over errantly while using the pool.
> 
> I will see if I can get them to open a Jira against this.
> 
> Thank you.
> 
> Vince
> 
> Get Outlook for iOS<https://aka.ms/o0ukef>
> ________________________________
> From: Matt Pavlovich <ma...@gmail.com>
> Sent: Monday, May 24, 2021 9:20:41 PM
> To: users@activemq.apache.org <us...@activemq.apache.org>
> Subject: Re: ActiveMQ multiple JDBC data sources in same configuration
> 
> Hey  Vince,
> 
> Most likely DB tuning and/or connection lifecycle coordination b/w the connection factory used by ActiveMQ and the database instance. Can’t rule out a bad or flaky database either. If the customer is struggling with keeping the connection pool tuned and consistent, adding more systems is going to increase the surface area for troubleshooting.
> 
> Have them open a JIRA and share what they can on the connection settings. Also, they’ll need to coordinate with their DB team to provide some indication as to why the locking is occurring from the DB point of view.
> 
> Thanks,
> Matt Pavlovich
> 
>> On May 24, 2021, at 7:19 PM, Vince Cox <VC...@perforce.com> wrote:
>> 
>> Thanks for replying so quickly Matt.
>> 
>> Customer is not having and issue with the data in the DB. The issue shows itself when ActiveMQ randomly has failover events when the lock is in the DB. It’s using the same connection pool as the store. Seems to be some type of contention and master slave pair fails over.
>> 
>> Vince
>> 
>> Get Outlook for iOS<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&amp;data=04%7C01%7CVCox%40perforce.com%7Ce7781671030a4bd21e2d08d91f1b5a23%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575024640192392%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=9iPoJpfB7VM1g%2FlDI1eJe%2BJorX3GYcrGeStHQ8cWhOo%3D&amp;reserved=0>
>> ________________________________
>> From: Matt Pavlovich <ma...@gmail.com>
>> Sent: Monday, May 24, 2021 7:43:54 PM
>> To: users@activemq.apache.org <us...@activemq.apache.org>
>> Subject: Re: ActiveMQ multiple JDBC data sources in same configuration
>> 
>> Hello Vince-
>> 
>> Are you able to detail out the use case and rationale for separating the data store from the locker? On the surface that sounds like creating an extra runtime coupling with a distributed system— generally that approach creates more aggregate downtime.
>> 
>> Thanks,
>> Matt Pavlovich
>> 
>>> On May 24, 2021, at 3:42 PM, Vince Cox <VC...@perforce.com> wrote:
>>> 
>>> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
>>> 
>>> Thank you.
>>> 
>>> Vince
>>> 
>>> 
>>> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>>> 
>> 
>> 
>> 
>> CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
>> 
>> 
>> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>> 
> 
> 
> 
> CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
> 
> 
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
> 


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Vince Cox <VC...@perforce.com>.
Matt,

We have not noticed any locking. Data server from the DB just fine. But, the leased locker functionality seems to fail over errantly while using the pool.

I will see if I can get them to open a Jira against this.

Thank you.

Vince

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Matt Pavlovich <ma...@gmail.com>
Sent: Monday, May 24, 2021 9:20:41 PM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: ActiveMQ multiple JDBC data sources in same configuration

Hey  Vince,

Most likely DB tuning and/or connection lifecycle coordination b/w the connection factory used by ActiveMQ and the database instance. Can’t rule out a bad or flaky database either. If the customer is struggling with keeping the connection pool tuned and consistent, adding more systems is going to increase the surface area for troubleshooting.

Have them open a JIRA and share what they can on the connection settings. Also, they’ll need to coordinate with their DB team to provide some indication as to why the locking is occurring from the DB point of view.

Thanks,
Matt Pavlovich

> On May 24, 2021, at 7:19 PM, Vince Cox <VC...@perforce.com> wrote:
>
> Thanks for replying so quickly Matt.
>
> Customer is not having and issue with the data in the DB. The issue shows itself when ActiveMQ randomly has failover events when the lock is in the DB. It’s using the same connection pool as the store. Seems to be some type of contention and master slave pair fails over.
>
> Vince
>
> Get Outlook for iOS<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fo0ukef&amp;data=04%7C01%7CVCox%40perforce.com%7Ce7781671030a4bd21e2d08d91f1b5a23%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575024640192392%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=9iPoJpfB7VM1g%2FlDI1eJe%2BJorX3GYcrGeStHQ8cWhOo%3D&amp;reserved=0>
> ________________________________
> From: Matt Pavlovich <ma...@gmail.com>
> Sent: Monday, May 24, 2021 7:43:54 PM
> To: users@activemq.apache.org <us...@activemq.apache.org>
> Subject: Re: ActiveMQ multiple JDBC data sources in same configuration
>
> Hello Vince-
>
> Are you able to detail out the use case and rationale for separating the data store from the locker? On the surface that sounds like creating an extra runtime coupling with a distributed system— generally that approach creates more aggregate downtime.
>
> Thanks,
> Matt Pavlovich
>
>> On May 24, 2021, at 3:42 PM, Vince Cox <VC...@perforce.com> wrote:
>>
>> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
>>
>> Thank you.
>>
>> Vince
>>
>>
>> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>>
>
>
>
> CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
>
>
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>



CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.


This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Matt Pavlovich <ma...@gmail.com>.
Hey  Vince,

Most likely DB tuning and/or connection lifecycle coordination b/w the connection factory used by ActiveMQ and the database instance. Can’t rule out a bad or flaky database either. If the customer is struggling with keeping the connection pool tuned and consistent, adding more systems is going to increase the surface area for troubleshooting.

Have them open a JIRA and share what they can on the connection settings. Also, they’ll need to coordinate with their DB team to provide some indication as to why the locking is occurring from the DB point of view.

Thanks,
Matt Pavlovich

> On May 24, 2021, at 7:19 PM, Vince Cox <VC...@perforce.com> wrote:
> 
> Thanks for replying so quickly Matt.
> 
> Customer is not having and issue with the data in the DB. The issue shows itself when ActiveMQ randomly has failover events when the lock is in the DB. It’s using the same connection pool as the store. Seems to be some type of contention and master slave pair fails over.
> 
> Vince
> 
> Get Outlook for iOS<https://aka.ms/o0ukef>
> ________________________________
> From: Matt Pavlovich <ma...@gmail.com>
> Sent: Monday, May 24, 2021 7:43:54 PM
> To: users@activemq.apache.org <us...@activemq.apache.org>
> Subject: Re: ActiveMQ multiple JDBC data sources in same configuration
> 
> Hello Vince-
> 
> Are you able to detail out the use case and rationale for separating the data store from the locker? On the surface that sounds like creating an extra runtime coupling with a distributed system— generally that approach creates more aggregate downtime.
> 
> Thanks,
> Matt Pavlovich
> 
>> On May 24, 2021, at 3:42 PM, Vince Cox <VC...@perforce.com> wrote:
>> 
>> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
>> 
>> Thank you.
>> 
>> Vince
>> 
>> 
>> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>> 
> 
> 
> 
> CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
> 
> 
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
> 


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Vince Cox <VC...@perforce.com>.
Thanks for replying so quickly Matt.

Customer is not having and issue with the data in the DB. The issue shows itself when ActiveMQ randomly has failover events when the lock is in the DB. It’s using the same connection pool as the store. Seems to be some type of contention and master slave pair fails over.

Vince

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Matt Pavlovich <ma...@gmail.com>
Sent: Monday, May 24, 2021 7:43:54 PM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: ActiveMQ multiple JDBC data sources in same configuration

Hello Vince-

Are you able to detail out the use case and rationale for separating the data store from the locker? On the surface that sounds like creating an extra runtime coupling with a distributed system— generally that approach creates more aggregate downtime.

Thanks,
Matt Pavlovich

> On May 24, 2021, at 3:42 PM, Vince Cox <VC...@perforce.com> wrote:
>
> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
>
> Thank you.
>
> Vince
>
>
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>



CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.


This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Matt Pavlovich <ma...@gmail.com>.
Hello Vince-

Are you able to detail out the use case and rationale for separating the data store from the locker? On the surface that sounds like creating an extra runtime coupling with a distributed system— generally that approach creates more aggregate downtime.

Thanks,
Matt Pavlovich

> On May 24, 2021, at 3:42 PM, Vince Cox <VC...@perforce.com> wrote:
> 
> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
> 
> Thank you.
> 
> Vince
> 
> 
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
> 


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Vince Cox <VC...@perforce.com>.
JB,

I am investigating this as well. Have you made any other discoveries?

Thank you. I appreciate your time.

Vince

On 5/25/21, 4:08 PM, "Jean-Baptiste Onofre" <jb...@nanthrax.net> wrote:

    Hmm,

    Which ActiveMQ version ?

    It might inherit the main ds from the persistence adapter. I will check tomorrow my time.

    Regards
    JB

    > Le 25 mai 2021 à 18:03, Vince Cox <VC...@perforce.com> a écrit :
    >
    > JB,
    >
    > My customer has gone this route and ActiveMQ started, however only the first data source listed (dsmain in your example) was used. Both the messages and locker were using only one datasource.
    >
    > Any thoughts around that?
    >
    > Regards,
    >
    > Vince
    >
    > On 5/25/21, 12:14 AM, "Jean-Baptiste Onofre" <jb...@nanthrax.net> wrote:
    >
    >    Hi Vince,
    >
    >    It’s possible to have different datasource: one for the main message store, one for the lease locker.
    >
    >    As JDBC leaser locker extends persistent adapter, you can pass a datasource. Something like this should work:
    >
    >    <persistenceAdapter>
    >        <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#dsmain" lockKeepAlivePeriod="5000">
    >          <locker>
    >            <lease-database-locker dataSource="#dslock" lockAcquireSleepInterval="10000"/>
    >          </locker>
    >        </jdbcPersistenceAdapter>
    >      </persistenceAdapter>
    >
    >    You can take a look on https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7C230af87a86d34051ffb808d91fb8bbc4%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575701286906268%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=AU%2F8myyTjqpnA18yYCNe%2BOpkLpB8LtSytRIr3FlQx0I%3D&amp;reserved=0 <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7C230af87a86d34051ffb808d91fb8bbc4%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575701286906268%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=AU%2F8myyTjqpnA18yYCNe%2BOpkLpB8LtSytRIr3FlQx0I%3D&amp;reserved=0>
    >
    >    Regards
    >    JB
    >
    >> Le 24 mai 2021 à 22:42, Vince Cox <VC...@perforce.com> a écrit :
    >>
    >> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
    >>
    >> Thank you.
    >>
    >> Vince
    >>
    >>
    >> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
    >>
    >
    >
    >
    >    CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
    >
    >
    > This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
    >



    CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.


This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Vince Cox <VC...@perforce.com>.
They are using version 5.14.5

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Jean-Baptiste Onofre <jb...@nanthrax.net>
Sent: Tuesday, May 25, 2021 4:07:23 PM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: ActiveMQ multiple JDBC data sources in same configuration

Hmm,

Which ActiveMQ version ?

It might inherit the main ds from the persistence adapter. I will check tomorrow my time.

Regards
JB

> Le 25 mai 2021 à 18:03, Vince Cox <VC...@perforce.com> a écrit :
>
> JB,
>
> My customer has gone this route and ActiveMQ started, however only the first data source listed (dsmain in your example) was used. Both the messages and locker were using only one datasource.
>
> Any thoughts around that?
>
> Regards,
>
> Vince
>
> On 5/25/21, 12:14 AM, "Jean-Baptiste Onofre" <jb...@nanthrax.net> wrote:
>
>    Hi Vince,
>
>    It’s possible to have different datasource: one for the main message store, one for the lease locker.
>
>    As JDBC leaser locker extends persistent adapter, you can pass a datasource. Something like this should work:
>
>    <persistenceAdapter>
>        <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#dsmain" lockKeepAlivePeriod="5000">
>          <locker>
>            <lease-database-locker dataSource="#dslock" lockAcquireSleepInterval="10000"/>
>          </locker>
>        </jdbcPersistenceAdapter>
>      </persistenceAdapter>
>
>    You can take a look on https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7C230af87a86d34051ffb808d91fb8bbc4%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575701286906268%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=AU%2F8myyTjqpnA18yYCNe%2BOpkLpB8LtSytRIr3FlQx0I%3D&amp;reserved=0 <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7C230af87a86d34051ffb808d91fb8bbc4%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575701286906268%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=AU%2F8myyTjqpnA18yYCNe%2BOpkLpB8LtSytRIr3FlQx0I%3D&amp;reserved=0>
>
>    Regards
>    JB
>
>> Le 24 mai 2021 à 22:42, Vince Cox <VC...@perforce.com> a écrit :
>>
>> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
>>
>> Thank you.
>>
>> Vince
>>
>>
>> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>>
>
>
>
>    CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
>
>
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>



CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.


This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hmm,

Which ActiveMQ version ?

It might inherit the main ds from the persistence adapter. I will check tomorrow my time.

Regards
JB

> Le 25 mai 2021 à 18:03, Vince Cox <VC...@perforce.com> a écrit :
> 
> JB,
> 
> My customer has gone this route and ActiveMQ started, however only the first data source listed (dsmain in your example) was used. Both the messages and locker were using only one datasource.
> 
> Any thoughts around that?
> 
> Regards,
> 
> Vince
> 
> On 5/25/21, 12:14 AM, "Jean-Baptiste Onofre" <jb...@nanthrax.net> wrote:
> 
>    Hi Vince,
> 
>    It’s possible to have different datasource: one for the main message store, one for the lease locker.
> 
>    As JDBC leaser locker extends persistent adapter, you can pass a datasource. Something like this should work:
> 
>    <persistenceAdapter>
>        <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#dsmain" lockKeepAlivePeriod="5000">
>          <locker>
>            <lease-database-locker dataSource="#dslock" lockAcquireSleepInterval="10000"/>
>          </locker>
>        </jdbcPersistenceAdapter>
>      </persistenceAdapter>
> 
>    You can take a look on https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7Ce18f02c053d0429288b508d91f3367fe%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575128536001839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Lwm3sFt4A01ljkYDnNEyw4o0msVoW2xK%2BBO24tToKKo%3D&amp;reserved=0 <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7Ce18f02c053d0429288b508d91f3367fe%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575128536001839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Lwm3sFt4A01ljkYDnNEyw4o0msVoW2xK%2BBO24tToKKo%3D&amp;reserved=0>
> 
>    Regards
>    JB
> 
>> Le 24 mai 2021 à 22:42, Vince Cox <VC...@perforce.com> a écrit :
>> 
>> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
>> 
>> Thank you.
>> 
>> Vince
>> 
>> 
>> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>> 
> 
> 
> 
>    CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
> 
> 
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
> 


ActiveMQ multiple JDBC data sources in same configuration

Posted by Vince Cox <VC...@perforce.com>.
JB,

My customer has gone this route and ActiveMQ started, however only the first data source listed (dsmain in your example) was used. Both the messages and locker were using only one datasource.

Any thoughts around that?

Regards,

Vince

On 5/25/21, 12:14 AM, "Jean-Baptiste Onofre" <jb...@nanthrax.net> wrote:

    Hi Vince,

    It’s possible to have different datasource: one for the main message store, one for the lease locker.

    As JDBC leaser locker extends persistent adapter, you can pass a datasource. Something like this should work:

    <persistenceAdapter>
        <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#dsmain" lockKeepAlivePeriod="5000">
          <locker>
            <lease-database-locker dataSource="#dslock" lockAcquireSleepInterval="10000"/>
          </locker>
        </jdbcPersistenceAdapter>
      </persistenceAdapter>

    You can take a look on https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7Ce18f02c053d0429288b508d91f3367fe%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575128536001839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Lwm3sFt4A01ljkYDnNEyw4o0msVoW2xK%2BBO24tToKKo%3D&amp;reserved=0 <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7Ce18f02c053d0429288b508d91f3367fe%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575128536001839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Lwm3sFt4A01ljkYDnNEyw4o0msVoW2xK%2BBO24tToKKo%3D&amp;reserved=0>

    Regards
    JB

    > Le 24 mai 2021 à 22:42, Vince Cox <VC...@perforce.com> a écrit :
    >
    > Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
    >
    > Thank you.
    >
    > Vince
    >
    >
    > This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
    >



    CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.


This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Vince Cox <VC...@perforce.com>.
Thank you JB, I will definitely take a look at that.

Vince

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Jean-Baptiste Onofre <jb...@nanthrax.net>
Sent: Tuesday, May 25, 2021 12:12:51 AM
To: users@activemq.apache.org <us...@activemq.apache.org>
Subject: Re: ActiveMQ multiple JDBC data sources in same configuration

Hi Vince,

It’s possible to have different datasource: one for the main message store, one for the lease locker.

As JDBC leaser locker extends persistent adapter, you can pass a datasource. Something like this should work:

<persistenceAdapter>
    <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#dsmain" lockKeepAlivePeriod="5000">
      <locker>
        <lease-database-locker dataSource="#dslock" lockAcquireSleepInterval="10000"/>
      </locker>
    </jdbcPersistenceAdapter>
  </persistenceAdapter>

You can take a look on https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7Ce18f02c053d0429288b508d91f3367fe%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575128536001839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Lwm3sFt4A01ljkYDnNEyw4o0msVoW2xK%2BBO24tToKKo%3D&amp;reserved=0 <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fblog.nanthrax.net%2F%3Fp%3D422&amp;data=04%7C01%7CVCox%40perforce.com%7Ce18f02c053d0429288b508d91f3367fe%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C637575128536001839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Lwm3sFt4A01ljkYDnNEyw4o0msVoW2xK%2BBO24tToKKo%3D&amp;reserved=0>

Regards
JB

> Le 24 mai 2021 à 22:42, Vince Cox <VC...@perforce.com> a écrit :
>
> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
>
> Thank you.
>
> Vince
>
>
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>



CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.


This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.


Re: ActiveMQ multiple JDBC data sources in same configuration

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi Vince,

It’s possible to have different datasource: one for the main message store, one for the lease locker.

As JDBC leaser locker extends persistent adapter, you can pass a datasource. Something like this should work:

<persistenceAdapter>
    <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#dsmain" lockKeepAlivePeriod="5000">
      <locker>
        <lease-database-locker dataSource="#dslock" lockAcquireSleepInterval="10000"/>
      </locker>
    </jdbcPersistenceAdapter>
  </persistenceAdapter>

You can take a look on http://blog.nanthrax.net/?p=422 <http://blog.nanthrax.net/?p=422> 

Regards
JB

> Le 24 mai 2021 à 22:42, Vince Cox <VC...@perforce.com> a écrit :
> 
> Are there any future plans with ActiveMQ that will provide separate data source (using JDBC) to handle leader activity and message traffic? We are aware we can use kahaDB and JDBC, but we’d like to have a separate JDBC sources for our message store and our lock.
> 
> Thank you.
> 
> Vince
> 
> 
> This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
>