Re: ActiveMQ master slave with data replication

2017-04-06 Thread Tim Bain
Also, you could consider using a RDBMS as your backing store. It's had less
tuning than KahaDB, and it's not particularly well supported on this
mailing list because I've never used it and I'm not sure if any of the
other active responders have either, but it's more stable than LevelDB and
it doesn't require a shared filesystem.

Tim

On Apr 7, 2017 12:29 AM, "Tim Bain"  wrote:

> ActiveMQ allows pluggable storage lockers (http://activemq.apache.org/
> pluggable-storage-lockers.html) which allow you to use a different
> technology for master election than you use for message storage. So the
> inability of a shared filesystem technology to provide distributed file
> locks isn't a deal breaker.
>
> Tim
>
> On Apr 6, 2017 11:58 AM, "Steve Hill"  wrote:
>
>> I would suggest checking out something like GlusterFS which created
>> distributed replicated data. We have used it for high performant
>> applications without problem. I am not sure how the slave knows how to not
>> start - so this may not work for you if it is based on file locking.
>>
>> Thanks
>> Steve
>>
>>
>> > On Apr 6, 2017, at 7:29 AM, khandelwalanuj <
>> anuj.cool.khandel...@gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I want to use ActiveMQ's master-slave topology where one broker is
>> master
>> > and other attaches as a slave. But we don't have any shared file system
>> for
>> > it. I know one way to do this is with replicated levelDB but since it is
>> > deprecated, I don't want to go ahead with this. Is there any way we can
>> do
>> > this by KahaDB  ?
>> >
>> > Thanks,
>> > Anuj
>> >
>> >
>> >
>> > --
>> > View this message in context: http://activemq.2283324.n4.nab
>> ble.com/ActiveMQ-master-slave-with-data-replication-tp4724611.html
>> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>


Re: ActiveMQ master slave with data replication

2017-04-06 Thread Tim Bain
ActiveMQ allows pluggable storage lockers (
http://activemq.apache.org/pluggable-storage-lockers.html) which allow you
to use a different technology for master election than you use for message
storage. So the inability of a shared filesystem technology to provide
distributed file locks isn't a deal breaker.

Tim

On Apr 6, 2017 11:58 AM, "Steve Hill"  wrote:

> I would suggest checking out something like GlusterFS which created
> distributed replicated data. We have used it for high performant
> applications without problem. I am not sure how the slave knows how to not
> start - so this may not work for you if it is based on file locking.
>
> Thanks
> Steve
>
>
> > On Apr 6, 2017, at 7:29 AM, khandelwalanuj  com> wrote:
> >
> > Hi,
> >
> > I want to use ActiveMQ's master-slave topology where one broker is master
> > and other attaches as a slave. But we don't have any shared file system
> for
> > it. I know one way to do this is with replicated levelDB but since it is
> > deprecated, I don't want to go ahead with this. Is there any way we can
> do
> > this by KahaDB  ?
> >
> > Thanks,
> > Anuj
> >
> >
> >
> > --
> > View this message in context: http://activemq.2283324.n4.
> nabble.com/ActiveMQ-master-slave-with-data-replication-tp4724611.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


Re: Same messages to new queue with new destination

2017-04-06 Thread Optimus
@Tim Thanks for sugegstions

The way I have achieved this is

Step 1:- Making a new queue which take data of existing queue










Step 2 :- Adding consumer for newly created queue






 



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Same-messages-to-new-queue-with-new-destination-tp4724608p4724696.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Demos on windows

2017-04-06 Thread Tim Bain
All of the (Linux-based) examples I found in the first few pages of Google
search results showed running from .. instead of cd'ing into bin, so I
expect we'd correct the problem you pointed out (thank you) by making it
use that same paradigm.

You're referring to a user guide that's bundled with the distribution zip,
right? If so, please submit a bug in JIRA, since that's a "code" change.

On Apr 6, 2017 5:36 PM, "LarryC"  wrote:

> The user guide for windows says:
> cd bin
> activemq.bat console xbean:examples/conf/activemq-demo.xml
>
>
> It should say:
> cd bin
> activemq.bat console xbean:../examples/conf/activemq-demo.xml
>
> or alternatively
> bin\activemq.bat console xbean:examples/conf/activemq-demo.xml
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Demos-on-windows-tp4724675.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Demos on windows

2017-04-06 Thread LarryC
The user guide for windows says:
cd bin
activemq.bat console xbean:examples/conf/activemq-demo.xml


It should say:
cd bin
activemq.bat console xbean:../examples/conf/activemq-demo.xml

or alternatively
bin\activemq.bat console xbean:examples/conf/activemq-demo.xml



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Demos-on-windows-tp4724675.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Unwanted caching of authorization results

2017-04-06 Thread Vince Cole
Sorry, forgot to say:
I am using ActiveMQ 5.14.0 and developing my own plugins. 
Trying to write a plugin to deliver same functionality as AuthorizationMap,
but as a proper plugin (i.e. using BrokerFilter, etc) so it can read a few
bean properties from activemq.xml on startup.

Also the message from abhijith at the bottom of mine is not related to this,
I replied to it by mistake >.<



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Unwanted-caching-of-authorization-results-tp4724676p4724677.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Unwanted caching of authorization results

2017-04-06 Thread Vince Cole
It would apoear that org.apache.activemq.security.AuthorizationBroker uses
Security context in some way to cache the results of authorization.

This means if I have a dynamic map (i.e. the permissions could change from
one 'send' request to the next, for any destination) the dynamic nature is
lost due to caching.

Can the caching be disabled or circumvented in any way? I would like the
AuthorizationBroker (or my equivalent of it) to check the map EVERY time.

Thanks


On 6 Apr 2017 04:02, "abhijith"  wrote:

> Hi,
>
> We are using Artemis 1.4.0 version and have a jms topic defined.  We have
> defined two specific roles for all topics, one to send and another to
> consume
>
> artemis-roles.properties:
> sendtopic=testtopicuser
> consumetopic=testtopicuser
>
> broker.xml:
>  
>  
>  
>  
>  
>
> When I try to send to this topic, it works fine.  But when I try to consume
> from this topic it fails giving below error.  If I add  type="createNonDurableQueue" roles="consumetopic"/> permission, it works
> fine.  Is this a bug in Artemis or am I missing something?  Any help is
> greatly appreciated.
>
> javax.jms.JMSSecurityException: AMQ119032: User: testtopicuser does not
> have
> permission='CREATE_NON_DURABLE_QUEUE' on address jms.topic.exampleTopic
>
> at
> org.apache.activemq.artemis.core.protocol.core.impl.ChannelI
> mpl.sendBlocking(ChannelImpl.java:409)
> at
> org.apache.activemq.artemis.core.protocol.core.impl.ChannelI
> mpl.sendBlocking(ChannelImpl.java:307)
> at
> org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQ
> SessionContext.createQueue(ActiveMQSessionContext.java:590)
> at
> org.apache.activemq.artemis.core.client.impl.ClientSessionIm
> pl.internalCreateQueue(ClientSessionImpl.java:1620)
> at
> org.apache.activemq.artemis.core.client.impl.ClientSessionIm
> pl.createTemporaryQueue(ClientSessionImpl.java:314)
> at
> org.apache.activemq.artemis.jms.client.ActiveMQSession.creat
> eConsumer(ActiveMQSession.java:690)
> at
> org.apache.activemq.artemis.jms.client.ActiveMQSession.creat
> eConsumer(ActiveMQSession.java:353)
> at
> org.apache.activemq.artemis.jms.client.ActiveMQSession.creat
> eConsumer(ActiveMQSession.java:325)
> at
> BasicSendReceiveTopicISTest.testBasicSendReceiveForStringMes
> sage(BasicSendReceiveTopicISTest.java:59)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.testng.internal.MethodInvocationHelper.invokeMethod(Meth
> odInvocationHelper.java:85)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:
> 1124)
> at
> org.testng.internal.TestMethodWorker.invokeTestMethods(TestM
> ethodWorker.java:125)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.
> java:108)
> at org.testng.TestRunner.privateRun(TestRunner.java:774)
> at org.testng.TestRunner.run(TestRunner.java:624)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
> at org.testng.SuiteRunner.run(SuiteRunner.java:261)
> at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java
> :52)
> at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
> at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
> at org.testng.TestNG.run(TestNG.java:1048)
> at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
> at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.
> java:127)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> ssorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.
> java:147)
> Caused by: ActiveMQSecurityException[errorType=SECURITY_EXCEPTION
> message=AMQ119032: User: testtopicuser does not have
> permission='CREATE_NON_DURABLE_QUEUE' on address jms.topic.exampleTopic]
> ... 37 more
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nab
> ble.com/Artemis-Bug-Consume-from-non-durable-jms-topic-tp4724597.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: [Artemis] [Bug] Consume from non-durable jms topic

2017-04-06 Thread Clebert Suconic
I would recommend you guys moving to 1.5.latest though.. it's totally
compatible.


On Thu, Apr 6, 2017 at 3:37 PM, abhijith  wrote:
> Good to know.  Thanks.  Appreciate the help
>
>
>
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/Artemis-Bug-Consume-from-non-durable-jms-topic-tp4724597p4724667.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Clebert Suconic


Re: [Artemis] [Bug] Consume from non-durable jms topic

2017-04-06 Thread abhijith
Good to know.  Thanks.  Appreciate the help



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Artemis-Bug-Consume-from-non-durable-jms-topic-tp4724597p4724667.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ master slave with data replication

2017-04-06 Thread Steve Hill
I would suggest checking out something like GlusterFS which created distributed 
replicated data. We have used it for high performant applications without 
problem. I am not sure how the slave knows how to not start - so this may not 
work for you if it is based on file locking.

Thanks
Steve


> On Apr 6, 2017, at 7:29 AM, khandelwalanuj  
> wrote:
> 
> Hi,
> 
> I want to use ActiveMQ's master-slave topology where one broker is master
> and other attaches as a slave. But we don't have any shared file system for
> it. I know one way to do this is with replicated levelDB but since it is
> deprecated, I don't want to go ahead with this. Is there any way we can do
> this by KahaDB  ?  
> 
> Thanks,
> Anuj
> 
> 
> 
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/ActiveMQ-master-slave-with-data-replication-tp4724611.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: Apache Artemis - Stress-test time

2017-04-06 Thread Justin Bertram
My advice is to simplify your environment, application, and broker 
configuration as much as possible while still reproducing the high CPU 
utilization.  If you can do it with only local resources (e.g. everything 
running on a laptop) then that's even better.  The simpler and easier it is to 
reproduce the faster (and more accurately) the problem can be analyzed and 
resolved.

After simplifying, the first thing would be to determine if the high CPU is 
being caused by garbage collection or something else.  You can monitor heap 
utilization with tools like JConsole and VisualVM.  Timely thread dumps are a 
great way to see what's consuming CPU within the broker itself.

Good luck.


Justin

- Original Message -
From: "francesco81" 
To: users@activemq.apache.org
Sent: Thursday, April 6, 2017 10:08:03 AM
Subject: Re: Apache Artemis - Stress-test time

Hi Justin,
we've tried by turning off tls. It doesn't change: cpu usage remain very
high.
We've tried also by disabling persistence. It changes a bit: at the
beginning of the connection phase, cpu goes to 50% ...then it increases time
by time til it reaches 100% when there are about 1000 connected clients.
Now we're going to add some logs to our scecurity plugin, to see the cpu
consumption for every involved thread.
Meanwhile I'm going to install and use Sun Oracle JDK 8, instead of the
current OpenJDK 8, but simply to have jmap, jstack and jcmd utilities to
make some additional analysis (I can't find them inside the standard OpenJDK
package for Centos7).

I'll let you know for further results.
Of course, any suggestion to make a better performance analysis is
appreciated.

Thanks a lot.

Francesco



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Apache-Artemis-Stress-test-time-tp4723999p4724632.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Same messages to new queue with new destination

2017-04-06 Thread Tim Bain
I'd use a composite queue:
http://activemq.apache.org/virtual-destinations.html (near the bottom)

Tim

On Apr 6, 2017 8:11 AM, "Optimus"  wrote:

I am currently working on a task which involve functionality of sending
duplicate messages to new queue which is directing to fresh location.

The scenario is like this

I have a queue name 'A' where I am receiving messages from long time. Now I
need to create a new queue with name 'B' and its destination is 'C'.

Messages of queue A will be saved in queue B at forwarded at location given
in C. This C is a tcp location. I have gone through concept
virtual-destinations, composite-destinations, message-groups etc but none of
these seems to be working for me.



--
View this message in context: http://activemq.2283324.n4.
nabble.com/Same-messages-to-new-queue-with-new-destination-tp4724608.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Apache Artemis - Stress-test time

2017-04-06 Thread francesco81
Hi Justin,
we've tried by turning off tls. It doesn't change: cpu usage remain very
high.
We've tried also by disabling persistence. It changes a bit: at the
beginning of the connection phase, cpu goes to 50% ...then it increases time
by time til it reaches 100% when there are about 1000 connected clients.
Now we're going to add some logs to our scecurity plugin, to see the cpu
consumption for every involved thread.
Meanwhile I'm going to install and use Sun Oracle JDK 8, instead of the
current OpenJDK 8, but simply to have jmap, jstack and jcmd utilities to
make some additional analysis (I can't find them inside the standard OpenJDK
package for Centos7).

I'll let you know for further results.
Of course, any suggestion to make a better performance analysis is
appreciated.

Thanks a lot.

Francesco



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Apache-Artemis-Stress-test-time-tp4723999p4724632.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ master slave with data replication

2017-04-06 Thread Justin Bertram
This doesn't directly answer your question, but...

Aside from using the 5.x broker you can use the ActiveMQ Artemis broker [1].  
It supports shared-nothing replication for live/backup.  See more in the 
documentation [2].


Justin

[1] http://activemq.apache.org/artemis/
[2] http://activemq.apache.org/artemis/docs/2.0.0/ha.html

- Original Message -
From: "khandelwalanuj" 
To: users@activemq.apache.org
Sent: Thursday, April 6, 2017 6:29:10 AM
Subject: ActiveMQ master slave with data replication

Hi,

I want to use ActiveMQ's master-slave topology where one broker is master
and other attaches as a slave. But we don't have any shared file system for
it. I know one way to do this is with replicated levelDB but since it is
deprecated, I don't want to go ahead with this. Is there any way we can do
this by KahaDB  ?  

Thanks,
Anuj



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-master-slave-with-data-replication-tp4724611.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: [Artemis] [Bug] Consume from non-durable jms topic

2017-04-06 Thread Justin Bertram
> Does this mean, in order to listen to a topic you would always need 2 roles?  
> createNonDurableQueue and consume?

You don't need two roles.  You just need two "permissions" (i.e. 
createNonDurableQueue and consume).  A single role can have multiple 
permissions.

> We don't need to have createDurableQueue role to consume from a queue..right?

You don't if the queue has already been created (e.g. via management operation 
or broker.xml).  However, if you are relying on the broker to auto-create the 
queue for you then the user will need the "createDurableQueue" permission.


Justin

- Original Message -
From: "abhijith" 
To: users@activemq.apache.org
Sent: Wednesday, April 5, 2017 10:30:12 PM
Subject: Re: [Artemis] [Bug] Consume from non-durable jms topic

Thanks for the reply and thats interesting.  Does this mean, in order to
listen to a topic you would always need 2 roles?  createNonDurableQueue and
consume?

Trying to understand difference with Queue.  We don't need to have
createDurableQueue role to consume from a queue..right?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Artemis-Bug-Consume-from-non-durable-jms-topic-tp4724597p4724599.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


ActiveMQ master slave with data replication

2017-04-06 Thread khandelwalanuj
Hi,

I want to use ActiveMQ's master-slave topology where one broker is master
and other attaches as a slave. But we don't have any shared file system for
it. I know one way to do this is with replicated levelDB but since it is
deprecated, I don't want to go ahead with this. Is there any way we can do
this by KahaDB  ?  

Thanks,
Anuj



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-master-slave-with-data-replication-tp4724611.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Same messages to new queue with new destination

2017-04-06 Thread Optimus
I am currently working on a task which involve functionality of sending
duplicate messages to new queue which is directing to fresh location.

The scenario is like this

I have a queue name 'A' where I am receiving messages from long time. Now I
need to create a new queue with name 'B' and its destination is 'C'.

Messages of queue A will be saved in queue B at forwarded at location given
in C. This C is a tcp location. I have gone through concept
virtual-destinations, composite-destinations, message-groups etc but none of
these seems to be working for me.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Same-messages-to-new-queue-with-new-destination-tp4724608.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.