Re: NFS v4 locks "given up" w/o any logging?

2016-03-19 Thread James A. Robinson
Yes indeed there was a problem w/ the underlying NFS connection, logged at
the OS level.  It's funny, this service wasn't even under load when the
timeout happened, so NFS is living up to my expectations already.

So I could either lower the client side timeouts to fit within the 30
second lease, or I could raise the server side lease time to match the 180
seconds the client will try for.


On Fri, Mar 18, 2016 at 8:26 AM, James A. Robinson 
wrote:

> Yes, the combination of settings in place right now could add up to 3
> minutes:
>
> On the client side:
>
> nfsvers=4,proto=tcp,
> hard,timeo=600,retrans=2,ac,acregmin=3,acregmax=60,acdirmin=30,fg,retry=120,
> sharecache,lookupcache=all,cto
>
> So right now it's got a 60 second timeo value, and it will retry up to 2
> times.  I'll see if I can find any OS level messages about the NFS server
> lock, or if the NFS server reported anything.
>
> On the server side:
>
> read delegation, 30 second lease for locks, grace period 45 seconds
>
>
> On Fri, Mar 18, 2016 at 6:30 AM, Tim Bain  wrote:
>
>> I'd say it's more likely that either 1) NFS gave away the lock when it
>> shouldn't have, or 2) network conditions were such that your master lost
>> connectivity and NFS rightly allowed the slave to take it.  In either
>> case,
>> useful logging could only come from your NFS server.
>>
>> Separately from the question of why this happened, I'm concerned that it
>> took 3 minutes for the master to recognize it had lost the lock (during
>> which time you'd have had a dual-master situation).  Can that be explained
>> by your specific NFS settings?
>>
>> Tim
>
>
>


NFS v4 locks "given up" w/o any logging?

2016-03-19 Thread James A. Robinson
Is it common that an activemq broker might give up its NFS v4 lock w/o
logging any sort of message?  I've got two brokers that logged this:

broker-a which held the log:
2016-03-17 15:01:51,113 [yMonitor Worker] WARN  Transport
   - Transport Connection to: tcp://104.232.16.4:62269 failed:
org.apache.activemq.transport.InactivityIOException: Channel was inactive
for too (>3) long: tcp://xxx.xxx.xxx.xxx:62269
2016-03-18 00:05:22,751 [KeepAlive Timer] INFO  LockFile
- Lock file /var/log/activemq/activemq-data/amq-dev-1/lock, locked at
Thu Mar 17 13:38:33 PDT 2016, has been modified at Fri Mar 18 00:02:15 PDT
2016
2016-03-18 00:05:22,758 [KeepAlive Timer] ERROR LockableServiceSupport
- amq-dev-1, no longer able to keep the exclusive lock so giving up
being a master
2016-03-18 00:05:22,761 [KeepAlive Timer] INFO  BrokerService
   - Apache ActiveMQ 5.13.2 (amq-dev-1, ID:cluster-51079-1458247119790-1:1)
is shutting down

broker-b which appeared to steal the lock:
2016-03-17 13:38:52,680 [JMX connector  ] INFO  ManagementContext
   - JMX consoles can connect to
service:jmx:rmi://localhost:2020/jndi/rmi://localhost:2020/jmxrmi
2016-03-18 00:02:23,593 [erSimpleAppMain] INFO  MessageDatabase
   - KahaDB is version 6
2016-03-18 00:02:23,762 [erSimpleAppMain] INFO  MessageDatabase
   - Recovering from the journal @1:63912
2016-03-18 00:02:24,043 [erSimpleAppMain] INFO  MessageDatabase
   - Recovery replayed 7130 operations from the journal in 0.296 seconds.
2016-03-18 00:02:24,058 [erSimpleAppMain] INFO  PListStoreImpl
- PListStore:[/var/log/activemq/activemq-data/amq-dev-1/tmp_storage]
started


Re: Artemis REST Interface Installation in Wildfly

2016-03-19 Thread amorell
Added the manifest entry in my pom and that did the trick.  Thank you.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Artemis-REST-Interface-Installation-in-Wildfly-tp4709542p4709588.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: ActiveMQ 5.13.1 Web Console, purge message queue, UnsupportedOperationException (possible CSRF attack)

2016-03-19 Thread Derek Mahar
Please note that I encountered this exception when using Firefox 45.0
to access ActiveMQ Web Console.

On 17 March 2016 at 11:44, Derek Mahar  wrote:
> What might be the cause of the following UnsupportedOperationException
> that ActiveMQ 5.13.1 Web Console reports when I attempt to
> unsuccessfully purge the contents of a queue, but after browsing that
> same queue?
>
> URL sequence:
>
> http://0.0.0.0:8161/admin/browse.jsp?JMSDestination=client.order.queue
> http://0.0.0.0:8161/admin/purgeDestination.action?JMSDestination=client.order.queue&JMSDestinationType=queue&secret=5b118f61-5f26-4f49-ab54-7ca682eb5b7c
>
>
>  WARN |
> org.springframework.web.util.NestedServletException: Request
> processing failed; nested exception is
> java.lang.UnsupportedOperationException: Possible CSRF attack
> at 
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:977)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> at 
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:856)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:622)[tomcat-servlet-api-8.0.24.jar:]
> at 
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-servlet-api-8.0.24.jar:]
> at 
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.apache.activemq.web.AuditFilter.doFilter(AuditFilter.java:59)[activemq-web-5.13.1.jar:5.13.1]
> at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:102)[file:/opt/apache-activemq-5.13.1/webapps/admin/WEB-INF/classes/:]
> at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.apache.activemq.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:47)[activemq-web-5.13.1.jar:5.13.1]
> at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.Server.handle(Server.java:499)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> at 
> org.

Re: ActiveMQ Queue TTL

2016-03-19 Thread Tim Bain
I thought (assumed, I guess) STOMP was just the transfer protocol but that
once the message made it to the broker it would be treated like any other
message.  So I had assumed you would set the same headers as for an
OpenWire message, including JMSExpiration.  Did I assume wrongly?
On Mar 18, 2016 6:53 AM, "shahbour"  wrote:

> Thanks i intercepted the message and added an expires header to the STOMP ,
> ActiveMQ stomp doesn't support ttl right ?
>
> On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
> ml-node+s2283324n4709663...@n4.nabble.com> wrote:
>
> > Time to live must be set by the producer; I'm not aware of a built-in way
> > to set it from the broker.  The one thing you might be able to do is use
> > an
> > embedded Camel route to set that attribute on each message as they are
> > received by the broker, but I've never tried that so I can't promise
> it'll
> > work.
> > On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> > > wrote:
> >
> > > Hello
> > >
> > > I want to set a default Time to live for all messages in a queue , is
> it
> > > possible and how
> > >
> > > BR
> > > Shahbour
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> >
> >
> > --
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
> > To unsubscribe from ActiveMQ Queue TTL, click here
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4709580&code=c2hhaGJvdXJAZ21haWwuY29tfDQ3MDk1ODB8LTE4Mzg3NzU0ODM=
> >
> > .
> > NAML
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Message content returns null occasionally from Virtual Topic to the consumer

2016-03-19 Thread Christopher Shannon
Can you create a new Jira for this and post your test case and log output
to it?  Based on your output there may be a race condition here that needs
further investigation.

On Tue, Mar 15, 2016 at 9:06 AM, Rohit Sonawat 
wrote:

> I have also tested in 5.13.2 and issue is still exists.
> I have a windows 64 bit environment in which i was also not able to
> replicate it but it is replicable in other system that we have, both 32 and
> 64 bit windows.
> Number of messages in which it will replicate is not consistent but it will
> eventually replicate
> try to process with more messages.
>
>
>
> On Tue, Mar 15, 2016 at 6:40 PM christopher.l.shannon [via ActiveMQ] <
> ml-node+s2283324n4709298...@n4.nabble.com> wrote:
>
> > I have run this test a few times and it I never get a null message, which
> > could just be because there is a race condition that isn't happening for
> > me.  Can you test with a later version such as 5.13.2 to see if it still
> > happens for you?
> >
> > On Tue, Mar 15, 2016 at 7:07 AM, Rohit Sonawat <[hidden email]
> > >
> > wrote:
> >
> > > Yes I am using default broker configuration
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://activemq.2283324.n4.nabble.com/Message-content-returns-null-occasionally-from-Virtual-Topic-to-the-consumer-tp4709151p4709292.html
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> >
> >
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> >
> http://activemq.2283324.n4.nabble.com/Message-content-returns-null-occasionally-from-Virtual-Topic-to-the-consumer-tp4709151p4709298.html
> > To unsubscribe from Message content returns null occasionally from
> Virtual
> > Topic to the consumer, click here
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4709151&code=cm9oaXRzb25hd2F0QGdtYWlsLmNvbXw0NzA5MTUxfC0yMjA1OTE2NzQ=
> >
> > .
> > NAML
> > <
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Message-content-returns-null-occasionally-from-Virtual-Topic-to-the-consumer-tp4709151p4709300.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: 'AllowLinkStealing' does not work for TCP transport with leveldb persistent store

2016-03-19 Thread Timothy Bish

On 03/18/2016 06:31 AM, khandelwalanuj wrote:

Hi,

I am using ActiveMQv5.11.1 with levelDB replication. I want to use
'allowLinkStealing' option for TCP transport. I tried but it doesn;t seems
to be removing old connections and adding new one.

Thanks,
Anuj



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/AllowLinkStealing-does-not-work-for-TCP-transport-with-leveldb-persistent-store-tp4709667.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

You should show us you broker configuration and a test case showing what 
your expectations are, there's not enough here to go on.


--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/



Re: NFS v4 locks "given up" w/o any logging?

2016-03-19 Thread James A. Robinson
Yes, the combination of settings in place right now could add up to 3
minutes:

On the client side:

nfsvers=4,proto=tcp,
hard,timeo=600,retrans=2,ac,acregmin=3,acregmax=60,acdirmin=30,fg,retry=120,
sharecache,lookupcache=all,cto

So right now it's got a 60 second timeo value, and it will retry up to 2
times.  I'll see if I can find any OS level messages about the NFS server
lock, or if the NFS server reported anything.

On the server side:

read delegation, 30 second lease for locks, grace period 45 seconds


On Fri, Mar 18, 2016 at 6:30 AM, Tim Bain  wrote:

> I'd say it's more likely that either 1) NFS gave away the lock when it
> shouldn't have, or 2) network conditions were such that your master lost
> connectivity and NFS rightly allowed the slave to take it.  In either case,
> useful logging could only come from your NFS server.
>
> Separately from the question of why this happened, I'm concerned that it
> took 3 minutes for the master to recognize it had lost the lock (during
> which time you'd have had a dual-master situation).  Can that be explained
> by your specific NFS settings?
>
> Tim


Re: Multiple virtual topics and messages routing to consumers

2016-03-19 Thread Nuno Oliveira
You're right the problem was the > wildcard ... thank you !

Le mercredi 16 mars 2016 à 08:03 -0600, Quinn Stevenson a écrit :
> Looking at your sample, I think your destination name is causing you 
> problems.  The “>” character is for pattern matching in the configs
> and wildcard subscribers - I don’t think wildcard producers are supported.  
> Can you try it with a different destination name?  Anything
> other than “>”.
> 
> My sample is Camel route - I’ve pasted the Spring XML file and the unit test 
> for it below.
> 
> — begin camel-context.xml
> 
> http://www.springframework.org/schema/beans";
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xsi:schemaLocation=
>"http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://camel.apache.org/schema/spring 
> http://camel.apache.org/schema/spring/camel-spring.xsd
> http://activemq.apache.org/schema/core 
> http://activemq.apache.org/schema/core/activemq-core-5.13.0.xsd";>;
> 
> 
> http://activemq.apache.org/schema/core"; 
> brokerName="embedded-broker" useJmx="false" persistent="false">
> 
> 
> 
>  class="org.apache.activemq.camel.component.ActiveMQComponent">
>  value="failover:vm://embedded-broker?create=false"/>
> 
> 
> http://camel.apache.org/schema/spring";>;
> 
>  uri="activemq://queue:Consumer.MigrationConsumer.VirtualTopic.MIGRATION" />
> 
> 
> 
> 
> 
>  uri="activemq://queue:Consumer.OtherConsumerOne.VirtualTopic.OTHER" />
> 
> 
> 
> 
> 
>  uri="activemq://queue:Consumer.OtherConsumerTwo.VirtualTopic.OTHER" />
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> — end camel-context.xml
> 
> —begin RouteTest.java
> package com.pronoia.camel;
> 
> import java.util.concurrent.TimeUnit;
> 
> import org.apache.camel.EndpointInject;
> import org.apache.camel.Produce;
> import org.apache.camel.ProducerTemplate;
> import org.apache.camel.builder.NotifyBuilder;
> import org.apache.camel.component.mock.MockEndpoint;
> import org.apache.camel.test.spring.CamelSpringTestSupport;
> import org.junit.Test;
> import org.springframework.context.support.AbstractApplicationContext;
> import org.springframework.context.support.ClassPathXmlApplicationContext;
> 
> public class RouteTest extends CamelSpringTestSupport{
> @Produce( uri = "direct://migration-message-producer")
> ProducerTemplate migrationProducer;
> 
> @Produce( uri = "direct://other-message-producer")
> ProducerTemplate otherProducer;
> 
> @EndpointInject( uri = "mock://MigrationConsumer")
> MockEndpoint migrationConsumer;
> 
> @EndpointInject( uri = "mock://OtherConsumerOne")
> MockEndpoint otherConsumerOne;
> 
> @EndpointInject( uri = "mock://OtherConsumerTwo")
> MockEndpoint otherConsumerTwo;
> 
> @Override
> protected AbstractApplicationContext createApplicationContext() {
> return new ClassPathXmlApplicationContext( 
> "META-INF/spring/camel-context.xml");
> }
> 
> @Override
> public boolean isUseAdviceWith() {
> return true;
> }
> 
> @Test
> public void testRoute() throws Exception {
> String migrationMessagePrefix = "Migration Message ";
> String otherMessagePrefix = "Other Message ";
> 
> int migrationMessageCount = 5;
> int otherMessageCount = 10;
> 
> NotifyBuilder notifyMigrationProducer = new 
> NotifyBuilder(context).from("direct://migration-message
> -producer").whenReceived(migrationMessageCount).create();
> NotifyBuilder notifyOtherProducer = new 
> NotifyBuilder(context).from("direct://other-message
> -producer").whenReceived(otherMessageCount).create();
> 
> migrationConsumer.expectedMessageCount( migrationMessageCount );
> otherConsumerOne.expectedMessageCount( otherMessageCount );
> otherConsumerTwo.expectedMessageCount( otherMessageCount );
> 
> 
> migrationConsumer.allMessages().body().startsWith(migrationMessagePrefix);
> otherConsumerOne.allMessages().body().startsWith(otherMessagePrefix);
> otherConsumerOne.allMessages().body().startsWith(otherMessagePrefix);
> 
> context.start();
> 
> for( int i=1; i<= migrationMessageCount; ++i ) {
> migrationProducer.sendBody( migrationMessagePrefix + i );
> }
> 
> for( int i=1; i<= otherMessageCount; ++i ) {
> otherProducer.sendBody( otherMessagePrefix + i );
> }
> 
> assertTrue("All migration messages were not sent", 
> notifyMigrationProducer.matches(5, TimeUnit.SECONDS));
> assertTrue("All other messages were not sent", 
> notifyOtherProducer.matches(5, TimeUnit.SECONDS));
> 
>

Re: ActiveMQ Queue TTL

2016-03-19 Thread shahbour
Thanks i intercepted the message and added an expires header to the STOMP ,
ActiveMQ stomp doesn't support ttl right ?

On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
ml-node+s2283324n4709663...@n4.nabble.com> wrote:

> Time to live must be set by the producer; I'm not aware of a built-in way
> to set it from the broker.  The one thing you might be able to do is use
> an
> embedded Camel route to set that attribute on each message as they are
> received by the broker, but I've never tried that so I can't promise it'll
> work.
> On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> > wrote:
>
> > Hello
> >
> > I want to set a default Time to live for all messages in a queue , is it
> > possible and how
> >
> > BR
> > Shahbour
> >
> >
> >
> > --
> > View this message in context:
> > http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
> To unsubscribe from ActiveMQ Queue TTL, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Configuring Virtual Destinations via Jolokia REST Api in ActiveMQ 5.13.2

2016-03-19 Thread Quinn Stevenson
Yes - the Camel route would be static, but you could use the recipient list EIP 
to dynamically determine where the messages are sent.
http://camel.apache.org/recipient-list.html 


> On Mar 17, 2016, at 5:15 PM, Adel Boutros  wrote:
> 
> Hello Quinn,
> 
> Camel route is still a static way of doing it as I have to write it in Xml
> file. It doesn't suite my test case which requires "dynamic" route creation
> while the broker is running. Do you confirm this? Unless I have missed
> something.
> 
> Just to compare with Artemis, for example, via Jolokia, you can create a
> "Divert" which redirects messages from Topic to Queue via a REST call to
> the running broker. The same applies to Qpid Java broker.
> 
> Regards,
> Adel Boutros
> Murex SAS
> www.murex.com
> 
> On Thu, Mar 17, 2016 at 1:33 AM, Quinn Stevenson <
> qu...@pronoia-solutions.com> wrote:
> 
>> You may be able to accomplish what you’re after using a Camel route
>> embedded in the ActiveMQ broker.
>> http://activemq.apache.org/broker-camel-component.html <
>> http://activemq.apache.org/broker-camel-component.html>
>>> On Mar 16, 2016, at 4:06 PM, Adel Boutros  wrote:
>>> 
>>> Hello Christopher,
>>> 
>>> In the way we will be using the broker, we would provide an API for
>> clients
>>> to create these "redirections" between queues and topics on the fly. So
>>> this feature would be really useful as I know no other way of linking a
>>> queue to a topic.
>>> 
>>> Regards,
>>> Adel Boutros
>>> Murex SAS
>>> www.murex.com
>>> 
>>> On Wed, Mar 16, 2016 at 7:51 PM, Christopher Shannon <
>>> christopher.l.shan...@gmail.com> wrote:
>>> 
 Currently this doesn't exist because Virtual destinations can only be
>> set
 on start up or modified by a runtime plugin. (either the xml runtime
>> plugin
 or the new java based one added in 5.13.0)
 
 There would need to be a new feature implemented to enable modification
 through JMX.
 
 On Wed, Mar 16, 2016 at 1:45 PM, Adel Boutros 
>> wrote:
 
> Hello,
> 
> I was wondering if there is a way to configure a Virtual Destination
> programmatically using the Jolokia REST Api?
> 
> I explored the JMX module using JConsole but found no possible
>> solution.
> 
> I am following the example here:
> http://activemq.apache.org/virtual-destinations.html
> 
> Regards,
> 
> Adel Boutros
> Murex SAS
> www.murex.com
> 
 
>> 
>> 



ActiveMQ Queue TTL

2016-03-19 Thread shahbour
Hello

I want to set a default Time to live for all messages in a queue , is it
possible and how

BR
Shahbour



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Unable to set Jetty httpClient option

2016-03-19 Thread Tim Bain
This looks like a question for the Camel mailing list.
On Mar 17, 2016 7:47 AM, "mluckam"  wrote:

> I am attempting to set my own httpClient in the url of the camel producer
> but
> it does not appear to be taking effect.  Looking at the JettyHttpComponent
> it appears that the endpoint options being set via the URL are extracted in
> the createEndpoint(String uri, String remaining, Map
> parameters) function.  Looking here I do not see any reference to
> extracting
> of an HttpClient.  Also if an HttpClient was to be set on the endpoint it
> appears that the JettyHttpEndpoint.setClient(HttpClient client) function
> would need to be called, but I did not see any references to this call.
>
> Any thoughts as to what is happening or is there something that I am
> missing?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Unable-to-set-Jetty-httpClient-option-tp4709557.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: ActiveMQ Queue TTL

2016-03-19 Thread Tim Bain
Time to live must be set by the producer; I'm not aware of a built-in way
to set it from the broker.  The one thing you might be able to do is use an
embedded Camel route to set that attribute on each message as they are
received by the broker, but I've never tried that so I can't promise it'll
work.
On Mar 17, 2016 1:33 PM, "shahbour"  wrote:

> Hello
>
> I want to set a default Time to live for all messages in a queue , is it
> possible and how
>
> BR
> Shahbour
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: Configuring Virtual Destinations via Jolokia REST Api in ActiveMQ 5.13.2

2016-03-19 Thread Quinn Stevenson
Sorry - I was a little vague.

I’d use a Camel route that called a bean to determine the recipient list.  That 
bean would load it’s configuration from a file, DB or whatever you requirements 
are.  The bean would also be able to update it’s configuration when the file 
changed.  You could use another route in the broker polling for a configuration 
file, and then update the beans config when you got a new file.

I didn’t work through all the details, but that’s what I was thinking.

> On Mar 18, 2016, at 7:09 AM, Tim Bain  wrote:
> 
> In non-embedded Camel, it's possible to define routes at runtime via the
> Java API; see for example
> http://nigap.blogspot.com/2012/02/camel-create-routes-dynamically.html?m=1
> 
> I'm not sure if it would work for an embedded Camel context, but it might.
> 
> Tim
> On Mar 17, 2016 5:45 PM, "Quinn Stevenson" 
> wrote:
> 
>> Yes - the Camel route would be static, but you could use the recipient
>> list EIP to dynamically determine where the messages are sent.
>> http://camel.apache.org/recipient-list.html <
>> http://camel.apache.org/recipient-list.html>
>> 
>>> On Mar 17, 2016, at 5:15 PM, Adel Boutros  wrote:
>>> 
>>> Hello Quinn,
>>> 
>>> Camel route is still a static way of doing it as I have to write it in
>> Xml
>>> file. It doesn't suite my test case which requires "dynamic" route
>> creation
>>> while the broker is running. Do you confirm this? Unless I have missed
>>> something.
>>> 
>>> Just to compare with Artemis, for example, via Jolokia, you can create a
>>> "Divert" which redirects messages from Topic to Queue via a REST call to
>>> the running broker. The same applies to Qpid Java broker.
>>> 
>>> Regards,
>>> Adel Boutros
>>> Murex SAS
>>> www.murex.com
>>> 
>>> On Thu, Mar 17, 2016 at 1:33 AM, Quinn Stevenson <
>>> qu...@pronoia-solutions.com> wrote:
>>> 
 You may be able to accomplish what you’re after using a Camel route
 embedded in the ActiveMQ broker.
 http://activemq.apache.org/broker-camel-component.html <
 http://activemq.apache.org/broker-camel-component.html>
> On Mar 16, 2016, at 4:06 PM, Adel Boutros  wrote:
> 
> Hello Christopher,
> 
> In the way we will be using the broker, we would provide an API for
 clients
> to create these "redirections" between queues and topics on the fly. So
> this feature would be really useful as I know no other way of linking a
> queue to a topic.
> 
> Regards,
> Adel Boutros
> Murex SAS
> www.murex.com
> 
> On Wed, Mar 16, 2016 at 7:51 PM, Christopher Shannon <
> christopher.l.shan...@gmail.com> wrote:
> 
>> Currently this doesn't exist because Virtual destinations can only be
 set
>> on start up or modified by a runtime plugin. (either the xml runtime
 plugin
>> or the new java based one added in 5.13.0)
>> 
>> There would need to be a new feature implemented to enable
>> modification
>> through JMX.
>> 
>> On Wed, Mar 16, 2016 at 1:45 PM, Adel Boutros 
 wrote:
>> 
>>> Hello,
>>> 
>>> I was wondering if there is a way to configure a Virtual Destination
>>> programmatically using the Jolokia REST Api?
>>> 
>>> I explored the JMX module using JConsole but found no possible
 solution.
>>> 
>>> I am following the example here:
>>> http://activemq.apache.org/virtual-destinations.html
>>> 
>>> Regards,
>>> 
>>> Adel Boutros
>>> Murex SAS
>>> www.murex.com
>>> 
>> 
 
 
>> 
>> 



Re: Exception in createSesson() inside an EJB user transaction

2016-03-19 Thread THMayr
Add on:

When I call createSession() with the following parameters, i get rid of the
exception:

session = connection.createSession (true, Session.AUTO_ACKNOWLEDGE);

Both parameters should be ignored, when the method is called in an EJB
container and a JTA transaction is active (see  Connection.createSession()

 
. But even when I leave out the /transacted/ parameter the exception is
thrown. The following error message remains:

14:46:50,221 ERROR
[org.jboss.jca.core.connectionmanager.listener.TxConnectionListener]
(default-threads - 45) IJ000315: Pool ConnectionFactory has 1 active handles

So I think this could be considered as a bug.

Now arises the next problem. I use the session to send response messages via
a response queue to the client. After sending the message I have to commit
the transaction, so that the message is actually delivered to the client:

producer = session.createProducer (responseQueue);
producer.setDeliveryMode (DeliveryMode.NON_PERSISTENT);
responseMessage = session.createTextMessage ();
...
producer.send (responseMessage);
userTransaction.commit ();
userTransaction.begin ();

This is done in a loop to send progress messages to the client. This works
for the first message. But when the second message is sent an exception
occurs saying the session is closed. Why this?? Does a commit close the
session??

In my opinion this is a bug,  too.

Thomas





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Exception-in-createSesson-inside-an-EJB-user-transaction-tp4709452p4709457.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Configuring Virtual Destinations via Jolokia REST Api in ActiveMQ 5.13.2

2016-03-19 Thread Quinn Stevenson
You may be able to accomplish what you’re after using a Camel route embedded in 
the ActiveMQ broker.
http://activemq.apache.org/broker-camel-component.html 

> On Mar 16, 2016, at 4:06 PM, Adel Boutros  wrote:
> 
> Hello Christopher,
> 
> In the way we will be using the broker, we would provide an API for clients
> to create these "redirections" between queues and topics on the fly. So
> this feature would be really useful as I know no other way of linking a
> queue to a topic.
> 
> Regards,
> Adel Boutros
> Murex SAS
> www.murex.com
> 
> On Wed, Mar 16, 2016 at 7:51 PM, Christopher Shannon <
> christopher.l.shan...@gmail.com> wrote:
> 
>> Currently this doesn't exist because Virtual destinations can only be set
>> on start up or modified by a runtime plugin. (either the xml runtime plugin
>> or the new java based one added in 5.13.0)
>> 
>> There would need to be a new feature implemented to enable modification
>> through JMX.
>> 
>> On Wed, Mar 16, 2016 at 1:45 PM, Adel Boutros  wrote:
>> 
>>> Hello,
>>> 
>>> I was wondering if there is a way to configure a Virtual Destination
>>> programmatically using the Jolokia REST Api?
>>> 
>>> I explored the JMX module using JConsole but found no possible solution.
>>> 
>>> I am following the example here:
>>> http://activemq.apache.org/virtual-destinations.html
>>> 
>>> Regards,
>>> 
>>> Adel Boutros
>>> Murex SAS
>>> www.murex.com
>>> 
>> 



Re: ActiveMQ 5.13.1 Web Console, purge message queue, UnsupportedOperationException (possible CSRF attack)

2016-03-19 Thread Derek Mahar
I encounter the same exception using ActiveMQ 5.13.2 Web Console.

On 17 March 2016 at 11:50, Derek Mahar  wrote:
> Please note that I encountered this exception when using Firefox 45.0
> to access ActiveMQ Web Console.
>
> On 17 March 2016 at 11:44, Derek Mahar  wrote:
>> What might be the cause of the following UnsupportedOperationException
>> that ActiveMQ 5.13.1 Web Console reports when I attempt to
>> unsuccessfully purge the contents of a queue, but after browsing that
>> same queue?
>>
>> URL sequence:
>>
>> http://0.0.0.0:8161/admin/browse.jsp?JMSDestination=client.order.queue
>> http://0.0.0.0:8161/admin/purgeDestination.action?JMSDestination=client.order.queue&JMSDestinationType=queue&secret=5b118f61-5f26-4f49-ab54-7ca682eb5b7c
>>
>>
>>  WARN |
>> org.springframework.web.util.NestedServletException: Request
>> processing failed; nested exception is
>> java.lang.UnsupportedOperationException: Possible CSRF attack
>> at 
>> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:977)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> at 
>> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:856)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> at 
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:622)[tomcat-servlet-api-8.0.24.jar:]
>> at 
>> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> at 
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-servlet-api-8.0.24.jar:]
>> at 
>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.apache.activemq.web.AuditFilter.doFilter(AuditFilter.java:59)[activemq-web-5.13.1.jar:5.13.1]
>> at 
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> at 
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
>> at 
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:102)[file:/opt/apache-activemq-5.13.1/webapps/admin/WEB-INF/classes/:]
>> at 
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.apache.activemq.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:47)[activemq-web-5.13.1.jar:5.13.1]
>> at 
>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
>> at 
>> org.eclipse.jetty.server.Server.handle(Serve

Re: [ANNOUNCE] CVE-2016-0782: ActiveMQ Web Console - Cross-Site Scripting

2016-03-19 Thread Christopher Shannon
Thanks for pointing that out, I have fixed the announcement.

On Thu, Mar 17, 2016 at 11:25 AM, Derek Mahar  wrote:

> The security advisory announcement claims that ActiveMQ 5.13.1 and
> older versions are affected and that ActiveMQ 5.13.2 fixes the issues.
>
> On 10 March 2016 at 07:45, Christopher Shannon
>  wrote:
> > There following security vulnerability was reported against Apache
> > ActiveMQ 5.13.0 and older versions.
> >
> > Please check the following document and see if you’re affected by the
> issue.
> >
> >
> http://activemq.apache.org/security-advisories.data/CVE-2016-0782-announcement.txt
> >
> > Apache ActiveMQ 5.13.1 and newer with appropriate fixes was released and
> > available for upgrade.
>
>
>
> --
> Derek Mahar
> 1.514.316.6736 Home
> 1.514.316.7348 Mobile
> 1.514.461.3650 x230 Work
> 102-1365 boulevard René-Lévesque Est
> Montréal QC H2L 2M1
> Canada
>


Re: Configuring Virtual Destinations via Jolokia REST Api in ActiveMQ 5.13.2

2016-03-19 Thread Adel Boutros
Hello Quinn,

Camel route is still a static way of doing it as I have to write it in Xml
file. It doesn't suite my test case which requires "dynamic" route creation
while the broker is running. Do you confirm this? Unless I have missed
something.

Just to compare with Artemis, for example, via Jolokia, you can create a
"Divert" which redirects messages from Topic to Queue via a REST call to
the running broker. The same applies to Qpid Java broker.

Regards,
Adel Boutros
Murex SAS
www.murex.com

On Thu, Mar 17, 2016 at 1:33 AM, Quinn Stevenson <
qu...@pronoia-solutions.com> wrote:

> You may be able to accomplish what you’re after using a Camel route
> embedded in the ActiveMQ broker.
> http://activemq.apache.org/broker-camel-component.html <
> http://activemq.apache.org/broker-camel-component.html>
> > On Mar 16, 2016, at 4:06 PM, Adel Boutros  wrote:
> >
> > Hello Christopher,
> >
> > In the way we will be using the broker, we would provide an API for
> clients
> > to create these "redirections" between queues and topics on the fly. So
> > this feature would be really useful as I know no other way of linking a
> > queue to a topic.
> >
> > Regards,
> > Adel Boutros
> > Murex SAS
> > www.murex.com
> >
> > On Wed, Mar 16, 2016 at 7:51 PM, Christopher Shannon <
> > christopher.l.shan...@gmail.com> wrote:
> >
> >> Currently this doesn't exist because Virtual destinations can only be
> set
> >> on start up or modified by a runtime plugin. (either the xml runtime
> plugin
> >> or the new java based one added in 5.13.0)
> >>
> >> There would need to be a new feature implemented to enable modification
> >> through JMX.
> >>
> >> On Wed, Mar 16, 2016 at 1:45 PM, Adel Boutros 
> wrote:
> >>
> >>> Hello,
> >>>
> >>> I was wondering if there is a way to configure a Virtual Destination
> >>> programmatically using the Jolokia REST Api?
> >>>
> >>> I explored the JMX module using JConsole but found no possible
> solution.
> >>>
> >>> I am following the example here:
> >>> http://activemq.apache.org/virtual-destinations.html
> >>>
> >>> Regards,
> >>>
> >>> Adel Boutros
> >>> Murex SAS
> >>> www.murex.com
> >>>
> >>
>
>


Re: Artemis REST Interface Installation in Wildfly

2016-03-19 Thread Justin Bertram
See the Wildfly documentation [1].  You can set a dependency in a WAR by 
specifying the module you want to depend on in the WAR's manifest.mf, e.g.:

  Dependencies: org.apache.activemq.artemis


Justin

[1] https://docs.jboss.org/author/display/WFLY10/Class+Loading+in+WildFly

- Original Message -
From: "Justin Bertram" 
To: users@activemq.apache.org
Sent: Thursday, March 17, 2016 5:25:42 PM
Subject: Re: Artemis REST Interface Installation in Wildfly

All the dependencies exist, but you have to set the dependency in the WAR.  Did 
you do that?


Justin

- Original Message -
From: "amorell" 
To: users@activemq.apache.org
Sent: Wednesday, March 16, 2016 4:56:06 PM
Subject: Artemis REST Interface Installation in Wildfly

I am attempting to install the Artemis REST interface into a Wildfly domain
and I am running into an issue.  

I am building the REST WAR file using the example POM supplied in the
Artemis documentation "Installing Within Pre-configured Environment". 
However, when I attempt to install and assign the WAR to the servers, I am
getting java.lang.ClassNotFoundException:
org.apache.activemq.artemis.api.core.client.ServerLocator.

I was under the impression all of the necessary dependencies for Artemis
core were already part of Wildfly.  I have messaging configured on my
servers so I know it is there and running.

Any help/guidance would be appreciated.

Thanks,
Tony



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Artemis-REST-Interface-Installation-in-Wildfly-tp4709542.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Artemis REST Interface Installation in Wildfly

2016-03-19 Thread Justin Bertram
All the dependencies exist, but you have to set the dependency in the WAR.  Did 
you do that?


Justin

- Original Message -
From: "amorell" 
To: users@activemq.apache.org
Sent: Wednesday, March 16, 2016 4:56:06 PM
Subject: Artemis REST Interface Installation in Wildfly

I am attempting to install the Artemis REST interface into a Wildfly domain
and I am running into an issue.  

I am building the REST WAR file using the example POM supplied in the
Artemis documentation "Installing Within Pre-configured Environment". 
However, when I attempt to install and assign the WAR to the servers, I am
getting java.lang.ClassNotFoundException:
org.apache.activemq.artemis.api.core.client.ServerLocator.

I was under the impression all of the necessary dependencies for Artemis
core were already part of Wildfly.  I have messaging configured on my
servers so I know it is there and running.

Any help/guidance would be appreciated.

Thanks,
Tony



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Artemis-REST-Interface-Installation-in-Wildfly-tp4709542.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Multiple virtual topics and messages routing to consumers

2016-03-19 Thread Quinn Stevenson
Looking at your sample, I think your destination name is causing you problems.  
The “>” character is for pattern matching in the configs and wildcard 
subscribers - I don’t think wildcard producers are supported.  Can you try it 
with a different destination name?  Anything other than “>”.

My sample is Camel route - I’ve pasted the Spring XML file and the unit test 
for it below.

— begin camel-context.xml

http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation=
   "http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
http://activemq.apache.org/schema/core 
http://activemq.apache.org/schema/core/activemq-core-5.13.0.xsd";>


http://activemq.apache.org/schema/core"; 
brokerName="embedded-broker" useJmx="false" persistent="false">







http://camel.apache.org/schema/spring";>






























— end camel-context.xml

—begin RouteTest.java
package com.pronoia.camel;

import java.util.concurrent.TimeUnit;

import org.apache.camel.EndpointInject;
import org.apache.camel.Produce;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.NotifyBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.spring.CamelSpringTestSupport;
import org.junit.Test;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class RouteTest extends CamelSpringTestSupport{
@Produce( uri = "direct://migration-message-producer")
ProducerTemplate migrationProducer;

@Produce( uri = "direct://other-message-producer")
ProducerTemplate otherProducer;

@EndpointInject( uri = "mock://MigrationConsumer")
MockEndpoint migrationConsumer;

@EndpointInject( uri = "mock://OtherConsumerOne")
MockEndpoint otherConsumerOne;

@EndpointInject( uri = "mock://OtherConsumerTwo")
MockEndpoint otherConsumerTwo;

@Override
protected AbstractApplicationContext createApplicationContext() {
return new ClassPathXmlApplicationContext( 
"META-INF/spring/camel-context.xml");
}

@Override
public boolean isUseAdviceWith() {
return true;
}

@Test
public void testRoute() throws Exception {
String migrationMessagePrefix = "Migration Message ";
String otherMessagePrefix = "Other Message ";

int migrationMessageCount = 5;
int otherMessageCount = 10;

NotifyBuilder notifyMigrationProducer = new 
NotifyBuilder(context).from("direct://migration-message-producer").whenReceived(migrationMessageCount).create();
NotifyBuilder notifyOtherProducer = new 
NotifyBuilder(context).from("direct://other-message-producer").whenReceived(otherMessageCount).create();

migrationConsumer.expectedMessageCount( migrationMessageCount );
otherConsumerOne.expectedMessageCount( otherMessageCount );
otherConsumerTwo.expectedMessageCount( otherMessageCount );


migrationConsumer.allMessages().body().startsWith(migrationMessagePrefix);
otherConsumerOne.allMessages().body().startsWith(otherMessagePrefix);
otherConsumerOne.allMessages().body().startsWith(otherMessagePrefix);

context.start();

for( int i=1; i<= migrationMessageCount; ++i ) {
migrationProducer.sendBody( migrationMessagePrefix + i );
}

for( int i=1; i<= otherMessageCount; ++i ) {
otherProducer.sendBody( otherMessagePrefix + i );
}

assertTrue("All migration messages were not sent", 
notifyMigrationProducer.matches(5, TimeUnit.SECONDS));
assertTrue("All other messages were not sent", 
notifyOtherProducer.matches(5, TimeUnit.SECONDS));

assertMockEndpointsSatisfied();
}
}
— end RouteTest.java


> On Mar 15, 2016, at 7:26 PM, Nuno Oliveira  
> wrote:
> 
> Thank you for the feedback. 
> 
> I have created a simple test case for this based on one of the ActiveMQ basic 
> examples (attached to this mail - App.java).
> 
> I create two producers, one that will send messages to virtual topic 
> VirtualTopic.> and another 
> one that will send messages to virtual topic VirtualTopic.MIGRATION.
> 
> And I create two consumers, one that will consume from queue 
> Consumer.ConsumerA.VirtualTopic.> and another 
> one that will consume from queue Consumer.ConsumerB.VirtualTopic.MIGRATION.
> 
> Sending one message to each virtual topic I would expect something like this:
> 
>Co

Re: ActiveMQ Queue TTL

2016-03-19 Thread Tim Bain
I'd never noticed that option on the plugin; thanks for pointing it out!
On Mar 18, 2016 6:57 AM, "Timothy Bish"  wrote:

> Take a look at the TimeStampPlugin which has an option to set a TTL on
> messages that arrive without one.
> http://activemq.apache.org/timestampplugin.html
>
> On 03/18/2016 12:38 AM, Tim Bain wrote:
>
>> Time to live must be set by the producer; I'm not aware of a built-in way
>> to set it from the broker.  The one thing you might be able to do is use
>> an
>> embedded Camel route to set that attribute on each message as they are
>> received by the broker, but I've never tried that so I can't promise it'll
>> work.
>> On Mar 17, 2016 1:33 PM, "shahbour"  wrote:
>>
>> Hello
>>>
>>> I want to set a default Time to live for all messages in a queue , is it
>>> possible and how
>>>
>>> BR
>>> Shahbour
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>>
>
> --
> Tim Bish
> twitter: @tabish121
> blog: http://timbish.blogspot.com/
>
>


Re: ActiveMQ Queue TTL

2016-03-19 Thread shahbour
If i got you correct , some headers on stomp are translated into JMSheaders
, here they are http://activemq.apache.org/stomp.html specifically in
*"Stomp extensions for JMS message semantics"*

BR

Shahbour

On Fri, Mar 18, 2016 at 1:21 PM Tim Bain [via ActiveMQ] <
ml-node+s2283324n4709675...@n4.nabble.com> wrote:

> I thought (assumed, I guess) STOMP was just the transfer protocol but that
> once the message made it to the broker it would be treated like any other
> message.  So I had assumed you would set the same headers as for an
> OpenWire message, including JMSExpiration.  Did I assume wrongly?
> On Mar 18, 2016 6:53 AM, "shahbour" <[hidden email]
> > wrote:
>
> > Thanks i intercepted the message and added an expires header to the
> STOMP ,
> > ActiveMQ stomp doesn't support ttl right ?
> >
> > On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
> > [hidden email] >
> wrote:
> >
> > > Time to live must be set by the producer; I'm not aware of a built-in
> way
> > > to set it from the broker.  The one thing you might be able to do is
> use
> > > an
> > > embedded Camel route to set that attribute on each message as they are
> > > received by the broker, but I've never tried that so I can't promise
> > it'll
> > > work.
> > > On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> > > > wrote:
> > >
> > > > Hello
> > > >
> > > > I want to set a default Time to live for all messages in a queue ,
> is
> > it
> > > > possible and how
> > > >
> > > > BR
> > > > Shahbour
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html
> > > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > > >
> > >
> > >
> > > --
> > > If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html
> > > To unsubscribe from ActiveMQ Queue TTL, click here
> > > <
> >
> >
> > > .
> > > NAML
> > > <
> >
> http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>
> > >
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html
>
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709675.html
> To unsubscribe from ActiveMQ Queue TTL, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709676.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Configuring Virtual Destinations via Jolokia REST Api in ActiveMQ 5.13.2

2016-03-19 Thread Adel Boutros
Hello guys,

There seem to be many possible ways of doing it. However, it seems a bit
complex when you compare it to the way it is done in Qpid Java Broker or
ActiveMQ Artemis for example:


   - Qpid Java broker: http://localhost:8080/api/latest/binding/topic/queue
   (+json request file for filters)
   - Artemis: http://localhost:8161/jolokia/exec/
   org.apache.activemq.artemis:type=Broker,brokerName="localhost"
   ,module=Core,serviceType=Server/createDivert/myDivert/topic/queue

Whereas in ActiveMQ, I have to integrate Camel, customize stuff, etc...

This makes me wonder if there is a reason there is no native support for
that in ActiveMQ's broker knowing that it also has support for Jolokia REST
just like Artemis

Regards,

Adel Boutros
Murex SAS
www.murex.com

On Fri, Mar 18, 2016 at 2:50 PM, Quinn Stevenson <
qu...@pronoia-solutions.com> wrote:

> Sorry - I was a little vague.
>
> I’d use a Camel route that called a bean to determine the recipient list.
> That bean would load it’s configuration from a file, DB or whatever you
> requirements are.  The bean would also be able to update it’s configuration
> when the file changed.  You could use another route in the broker polling
> for a configuration file, and then update the beans config when you got a
> new file.
>
> I didn’t work through all the details, but that’s what I was thinking.
>
> > On Mar 18, 2016, at 7:09 AM, Tim Bain  wrote:
> >
> > In non-embedded Camel, it's possible to define routes at runtime via the
> > Java API; see for example
> >
> http://nigap.blogspot.com/2012/02/camel-create-routes-dynamically.html?m=1
> >
> > I'm not sure if it would work for an embedded Camel context, but it
> might.
> >
> > Tim
> > On Mar 17, 2016 5:45 PM, "Quinn Stevenson" 
> > wrote:
> >
> >> Yes - the Camel route would be static, but you could use the recipient
> >> list EIP to dynamically determine where the messages are sent.
> >> http://camel.apache.org/recipient-list.html <
> >> http://camel.apache.org/recipient-list.html>
> >>
> >>> On Mar 17, 2016, at 5:15 PM, Adel Boutros  wrote:
> >>>
> >>> Hello Quinn,
> >>>
> >>> Camel route is still a static way of doing it as I have to write it in
> >> Xml
> >>> file. It doesn't suite my test case which requires "dynamic" route
> >> creation
> >>> while the broker is running. Do you confirm this? Unless I have missed
> >>> something.
> >>>
> >>> Just to compare with Artemis, for example, via Jolokia, you can create
> a
> >>> "Divert" which redirects messages from Topic to Queue via a REST call
> to
> >>> the running broker. The same applies to Qpid Java broker.
> >>>
> >>> Regards,
> >>> Adel Boutros
> >>> Murex SAS
> >>> www.murex.com
> >>>
> >>> On Thu, Mar 17, 2016 at 1:33 AM, Quinn Stevenson <
> >>> qu...@pronoia-solutions.com> wrote:
> >>>
>  You may be able to accomplish what you’re after using a Camel route
>  embedded in the ActiveMQ broker.
>  http://activemq.apache.org/broker-camel-component.html <
>  http://activemq.apache.org/broker-camel-component.html>
> > On Mar 16, 2016, at 4:06 PM, Adel Boutros 
> wrote:
> >
> > Hello Christopher,
> >
> > In the way we will be using the broker, we would provide an API for
>  clients
> > to create these "redirections" between queues and topics on the fly.
> So
> > this feature would be really useful as I know no other way of
> linking a
> > queue to a topic.
> >
> > Regards,
> > Adel Boutros
> > Murex SAS
> > www.murex.com
> >
> > On Wed, Mar 16, 2016 at 7:51 PM, Christopher Shannon <
> > christopher.l.shan...@gmail.com> wrote:
> >
> >> Currently this doesn't exist because Virtual destinations can only
> be
>  set
> >> on start up or modified by a runtime plugin. (either the xml runtime
>  plugin
> >> or the new java based one added in 5.13.0)
> >>
> >> There would need to be a new feature implemented to enable
> >> modification
> >> through JMX.
> >>
> >> On Wed, Mar 16, 2016 at 1:45 PM, Adel Boutros 
>  wrote:
> >>
> >>> Hello,
> >>>
> >>> I was wondering if there is a way to configure a Virtual
> Destination
> >>> programmatically using the Jolokia REST Api?
> >>>
> >>> I explored the JMX module using JConsole but found no possible
>  solution.
> >>>
> >>> I am following the example here:
> >>> http://activemq.apache.org/virtual-destinations.html
> >>>
> >>> Regards,
> >>>
> >>> Adel Boutros
> >>> Murex SAS
> >>> www.murex.com
> >>>
> >>
> 
> 
> >>
> >>
>
>


Re: Exception in createSesson() inside an EJB user transaction

2016-03-19 Thread Tim Bain
I see java.lang.AbstractMethodError:
org.apache.activemq.ra.ManagedConnectionProxy.createSession()Ljavax/jms/Session;
in the logs, which implies that the version of that class at runtime is
different than what you compiled against. (source:
http://stackoverflow.com/questions/17969365/why-i-am-getting-java-lang-abstractmethoderror-errors
)

Is there any chance you upgraded the RA JAR without recompiling, and that
your code won't compile against the latest version?  Alternatively, might
there be two copies of that class with different versions on the classpath,
such that the JVM might be finding the wrong one?
On Mar 16, 2016 8:29 AM, "THMayr"  wrote:

> Hi,
>
> I get an exception creating a session in a MDB when the session is created
> inside a user transaction. The code sequence in the MDB looks like this:
>
> connectionFactory = (ConnectionFactory)
> environmentContext.lookup("jms/ConnectionFactory");
> ejbContext   = (MessageDrivenContext)
> initialContext.lookup("java:comp/EJBContext");
> userTransaction= ejbContext.getUserTransaction ();
> userTransaction.setTransactionTimeout (6);
> userTransaction.begin ();
> connection = connectionFactory.createConnection ();
> connection.start ();
> session = connection.createSession ();
> ...
> userTransaction.commit ();
>
> When I remove /userTransaction.begin () /and /userTransaction.commit ()/ it
> works. The MDB is deployed on a WildFly 10.0.0 and the ActiveMQ resource
> adapter activemq-rar-5.13.1.rar is deployed.
>
> Another interesting error message may be this one, which is printed after
> /onMessage()/ is left:
>
> 11:10:08,426 ERROR
> [org.jboss.jca.core.connectionmanager.listener.TxConnectionListener]
> (default-threads - 8) IJ000315: Pool ConnectionFactory has 1 active handles
>
> Any ideas what is going wrong or missing here?
>
> Here the stack trace:
>
> 11:10:08,357 INFO  [stdout] (default-threads - 8) TestMessageBeanLow, Low
> Priority 0: Exception occurred:
>
> org.apache.activemq.ra.ManagedConnectionProxy.createSession()Ljavax/jms/Session;
> 11:10:08,359 ERROR [stderr] (default-threads - 8)
> java.lang.AbstractMethodError:
>
> org.apache.activemq.ra.ManagedConnectionProxy.createSession()Ljavax/jms/Session;
> 11:10:08,359 ERROR [stderr] (default-threads - 8)   at
> de.adesso.tma.test.ejb.TestMessageBean.onMessage(TestMessageBean.java:212)
> 11:10:08,359 ERROR [stderr] (default-threads - 8)   at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 11:10:08,360 ERROR [stderr] (default-threads - 8)   at
> sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 11:10:08,361 ERROR [stderr] (default-threads - 8)   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 11:10:08,361 ERROR [stderr] (default-threads - 8)   at
> java.lang.reflect.Method.invoke(Unknown Source)
> 11:10:08,363 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
> 11:10:08,363 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,364 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
> 11:10:08,365 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
> 11:10:08,366 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
> 11:10:08,366 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
> 11:10:08,367 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,367 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
> 11:10:08,369 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,369 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:103)
> 11:10:08,370 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:58)
> 11:10:08,370 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
> 11:10:08,372 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
> 11:10:08,372 ERROR [stderr] (default-threads - 8)   at
>
> org.jboss.weld.ejb.AbstractEJBReques

Re: NFS v4 locks "given up" w/o any logging?

2016-03-19 Thread Tim Bain
I'd say it's more likely that either 1) NFS gave away the lock when it
shouldn't have, or 2) network conditions were such that your master lost
connectivity and NFS rightly allowed the slave to take it.  In either case,
useful logging could only come from your NFS server.

Separately from the question of why this happened, I'm concerned that it
took 3 minutes for the master to recognize it had lost the lock (during
which time you'd have had a dual-master situation).  Can that be explained
by your specific NFS settings?

Tim
On Mar 18, 2016 7:04 AM, "James A. Robinson"  wrote:

> Is it common that an activemq broker might give up its NFS v4 lock w/o
> logging any sort of message?  I've got two brokers that logged this:
>
> broker-a which held the log:
> 2016-03-17 15:01:51,113 [yMonitor Worker] WARN  Transport
>- Transport Connection to: tcp://104.232.16.4:62269 failed:
> org.apache.activemq.transport.InactivityIOException: Channel was inactive
> for too (>3) long: tcp://xxx.xxx.xxx.xxx:62269
> 2016-03-18 00:05:22,751 [KeepAlive Timer] INFO  LockFile
> - Lock file /var/log/activemq/activemq-data/amq-dev-1/lock, locked at
> Thu Mar 17 13:38:33 PDT 2016, has been modified at Fri Mar 18 00:02:15 PDT
> 2016
> 2016-03-18 00:05:22,758 [KeepAlive Timer] ERROR LockableServiceSupport
> - amq-dev-1, no longer able to keep the exclusive lock so giving up
> being a master
> 2016-03-18 00:05:22,761 [KeepAlive Timer] INFO  BrokerService
>- Apache ActiveMQ 5.13.2 (amq-dev-1, ID:cluster-51079-1458247119790-1:1)
> is shutting down
>
> broker-b which appeared to steal the lock:
> 2016-03-17 13:38:52,680 [JMX connector  ] INFO  ManagementContext
>- JMX consoles can connect to
> service:jmx:rmi://localhost:2020/jndi/rmi://localhost:2020/jmxrmi
> 2016-03-18 00:02:23,593 [erSimpleAppMain] INFO  MessageDatabase
>- KahaDB is version 6
> 2016-03-18 00:02:23,762 [erSimpleAppMain] INFO  MessageDatabase
>- Recovering from the journal @1:63912
> 2016-03-18 00:02:24,043 [erSimpleAppMain] INFO  MessageDatabase
>- Recovery replayed 7130 operations from the journal in 0.296 seconds.
> 2016-03-18 00:02:24,058 [erSimpleAppMain] INFO  PListStoreImpl
> - PListStore:[/var/log/activemq/activemq-data/amq-dev-1/tmp_storage]
> started
>


Sending multiple files in a single message into messaging queue

2016-03-19 Thread Subbu
Hi,


As part of requirement i need to send multiple files in a single message
into messaging queue.

Please help to suggest me if any way to achieve using blobmessage or any
others.


Thank you

Regards
Subbu



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Sending-multiple-files-in-a-single-message-into-messaging-queue-tp4709668.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Message content returns null occasionally from Virtual Topic to the consumer

2016-03-19 Thread Rohit Sonawat
Thanks for your time I have created the JIRA issue and attached the sample
java code and the log. This is the  link
   of the issue  



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Message-content-returns-null-occasionally-from-Virtual-Topic-to-the-consumer-tp4709151p4709552.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: NFS v4 locks "given up" w/o any logging?

2016-03-19 Thread James A. Robinson
Lowering timeo on the client side doesn't appear to do jack to help with
this
situation.  I'm reluctant to switch from "hard" to "soft" because of the
warning
that it can easily lead to corruption issues, but I do see some discussions
where people say flipping to that mode helped them detect lost locks.

Anyone who has an HA configuration using NFS that they know works for
failover care to share exactly what mount settings they are using?


On Fri, Mar 18, 2016 at 8:51 AM, James A. Robinson 
wrote:

> Yes indeed there was a problem w/ the underlying NFS connection, logged at
> the OS level.  It's funny, this service wasn't even under load when the
> timeout happened, so NFS is living up to my expectations already.
>
> So I could either lower the client side timeouts to fit within the 30
> second lease, or I could raise the server side lease time to match the 180
> seconds the client will try for.
>


ActiveMQ 5.13.2 null transaction debug messages

2016-03-19 Thread Derek Mahar
What is the significance of the following messages?  I've inherited an
ActiveMQ client application that continuously repeats these messages.
 Are these normal?

2016-03-17 15:56:15.635 [DEBUG] [jmsContainer-1]
[org.apache.activemq.ActiveMQMessageConsumer:739] remove:
ID:derek-lubuntu-33602-1458243607058-1:1:2:322,
lastDeliveredSequenceId: -1
2016-03-17 15:56:15.635 [DEBUG] [jmsContainer-1]
[org.apache.activemq.ActiveMQSession:580]
ID:derek-lubuntu-33602-1458243607058-1:1:2 Transaction Commit :null
2016-03-17 15:56:15.635 [DEBUG] [jmsContainer-1]
[org.apache.activemq.ActiveMQSession:601]
ID:derek-lubuntu-33602-1458243607058-1:1:2 Transaction Rollback,
txid:null
2

Thank you,

Derek


Unable to set Jetty httpClient option

2016-03-19 Thread mluckam
I am attempting to set my own httpClient in the url of the camel producer but
it does not appear to be taking effect.  Looking at the JettyHttpComponent
it appears that the endpoint options being set via the URL are extracted in
the createEndpoint(String uri, String remaining, Map
parameters) function.  Looking here I do not see any reference to extracting
of an HttpClient.  Also if an HttpClient was to be set on the endpoint it
appears that the JettyHttpEndpoint.setClient(HttpClient client) function
would need to be called, but I did not see any references to this call.

Any thoughts as to what is happening or is there something that I am
missing?



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Unable-to-set-Jetty-httpClient-option-tp4709557.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Exception in createSesson() inside an EJB user transaction

2016-03-19 Thread THMayr
.. some more thoughts:

The MDB is in fact not compiled or linked against any concrete ActiveMQ
classes. The MDB uses only the standard interfaces defined in the package
javax.jms. I need the ActiveMQ client library in my developement project
only to run a JUnit test, which sends and receives messages. So there is no
need to include the ActiveMQ client library in the EAR, which contains the
MDB.

So, if there are conflicting classes, they must be provided by WildFly.

Thomas



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Exception-in-createSesson-inside-an-EJB-user-transaction-tp4709452p4709665.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Configuring Virtual Destinations via Jolokia REST Api in ActiveMQ 5.13.2

2016-03-19 Thread Tim Bain
In non-embedded Camel, it's possible to define routes at runtime via the
Java API; see for example
http://nigap.blogspot.com/2012/02/camel-create-routes-dynamically.html?m=1

I'm not sure if it would work for an embedded Camel context, but it might.

Tim
On Mar 17, 2016 5:45 PM, "Quinn Stevenson" 
wrote:

> Yes - the Camel route would be static, but you could use the recipient
> list EIP to dynamically determine where the messages are sent.
> http://camel.apache.org/recipient-list.html <
> http://camel.apache.org/recipient-list.html>
>
> > On Mar 17, 2016, at 5:15 PM, Adel Boutros  wrote:
> >
> > Hello Quinn,
> >
> > Camel route is still a static way of doing it as I have to write it in
> Xml
> > file. It doesn't suite my test case which requires "dynamic" route
> creation
> > while the broker is running. Do you confirm this? Unless I have missed
> > something.
> >
> > Just to compare with Artemis, for example, via Jolokia, you can create a
> > "Divert" which redirects messages from Topic to Queue via a REST call to
> > the running broker. The same applies to Qpid Java broker.
> >
> > Regards,
> > Adel Boutros
> > Murex SAS
> > www.murex.com
> >
> > On Thu, Mar 17, 2016 at 1:33 AM, Quinn Stevenson <
> > qu...@pronoia-solutions.com> wrote:
> >
> >> You may be able to accomplish what you’re after using a Camel route
> >> embedded in the ActiveMQ broker.
> >> http://activemq.apache.org/broker-camel-component.html <
> >> http://activemq.apache.org/broker-camel-component.html>
> >>> On Mar 16, 2016, at 4:06 PM, Adel Boutros  wrote:
> >>>
> >>> Hello Christopher,
> >>>
> >>> In the way we will be using the broker, we would provide an API for
> >> clients
> >>> to create these "redirections" between queues and topics on the fly. So
> >>> this feature would be really useful as I know no other way of linking a
> >>> queue to a topic.
> >>>
> >>> Regards,
> >>> Adel Boutros
> >>> Murex SAS
> >>> www.murex.com
> >>>
> >>> On Wed, Mar 16, 2016 at 7:51 PM, Christopher Shannon <
> >>> christopher.l.shan...@gmail.com> wrote:
> >>>
>  Currently this doesn't exist because Virtual destinations can only be
> >> set
>  on start up or modified by a runtime plugin. (either the xml runtime
> >> plugin
>  or the new java based one added in 5.13.0)
> 
>  There would need to be a new feature implemented to enable
> modification
>  through JMX.
> 
>  On Wed, Mar 16, 2016 at 1:45 PM, Adel Boutros 
> >> wrote:
> 
> > Hello,
> >
> > I was wondering if there is a way to configure a Virtual Destination
> > programmatically using the Jolokia REST Api?
> >
> > I explored the JMX module using JConsole but found no possible
> >> solution.
> >
> > I am following the example here:
> > http://activemq.apache.org/virtual-destinations.html
> >
> > Regards,
> >
> > Adel Boutros
> > Murex SAS
> > www.murex.com
> >
> 
> >>
> >>
>
>


Re: ActiveMQ Queue TTL

2016-03-19 Thread Timothy Bish

On 03/18/2016 09:41 AM, Tim Bain wrote:

More fundamentally, I'm saying that I have always assumed that when a STOMP
message comes to a broker, it's translated into a JMS message and it stays
in that format until it is delivered to a STOMP consumer.  If that's
accurate, it means that all JMS headers are available to be set, and they
will be acted upon by the broker in the normal fashion.   It's not about
what headers are translated from STOMP, it's about whether the ones that
aren't set by STOMP are available to be set by your Camel route.

All of this is simply my assumptions, and it doesn't mean they're right,
but hopefully someone who has better knowledge of how this works can say
whether my assumptions are right.


You are correct, all messages enter the broker bits as an 
ActiveMQMessage instance translated from the protocol message type which 
will then behave as any other message would so a camel route in the 
broker etc doesn't need to know where it came from.  There are no STOMP 
messages or AMQP message etc, they are all converted to the canonical 
type and converted again to the protocol type on the way out to the 
STOMP consumer etc.




Tim
On Mar 18, 2016 7:26 AM, "shahbour"  wrote:


If i got you correct , some headers on stomp are translated into JMSheaders
, here they are http://activemq.apache.org/stomp.html specifically in
*"Stomp extensions for JMS message semantics"*

BR

Shahbour

On Fri, Mar 18, 2016 at 1:21 PM Tim Bain [via ActiveMQ] <
ml-node+s2283324n4709675...@n4.nabble.com> wrote:


I thought (assumed, I guess) STOMP was just the transfer protocol but

that

once the message made it to the broker it would be treated like any other
message.  So I had assumed you would set the same headers as for an
OpenWire message, including JMSExpiration.  Did I assume wrongly?
On Mar 18, 2016 6:53 AM, "shahbour" <[hidden email]
> wrote:


Thanks i intercepted the message and added an expires header to the

STOMP ,

ActiveMQ stomp doesn't support ttl right ?

On Fri, Mar 18, 2016 at 4:38 AM Tim Bain [via ActiveMQ] <
[hidden email] 
/user/SendEmail.jtp?type=node&node=4709675&i=1>>

wrote:

Time to live must be set by the producer; I'm not aware of a built-in

way

to set it from the broker.  The one thing you might be able to do is

use

an
embedded Camel route to set that attribute on each message as they

are

received by the broker, but I've never tried that so I can't promise

it'll

work.
On Mar 17, 2016 1:33 PM, "shahbour" <[hidden email]
> wrote:


Hello

I want to set a default Time to live for all messages in a queue ,

is

it

possible and how

BR
Shahbour



--
View this message in context:


http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580.html

Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
If you reply to this email, your message will be added to the

discussion

below:



http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709663.html

To unsubscribe from ActiveMQ Queue TTL, click here
<



.
NAML
<

http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml






--
View this message in context:


http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709670.html

Sent from the ActiveMQ - User mailing list archive at Nabble.com.

If you reply to this email, your message will be added to the discussion
below:



http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709675.html

To unsubscribe from ActiveMQ Queue TTL, click here
<

http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4709580&code=c2hhaGJvdXJAZ21haWwuY29tfDQ3MDk1ODB8LTE4Mzg3NzU0ODM=

.
NAML
<

http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml






--
View this message in context:
http://activemq.2283324.n4.nabble.com/ActiveMQ-Queue-TTL-tp4709580p4709676.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/



Re: ActiveMQ 5.13.1 Web Console, purge message queue, UnsupportedOperationException (possible CSRF attack)

2016-03-19 Thread Christopher Shannon
Take a look at the comments here and see if that helps you.
https://issues.apache.org/jira/browse/AMQ-3425

I think it will also work in other browsers besides firefox.

On Thu, Mar 17, 2016 at 12:09 PM, Derek Mahar  wrote:

> I encounter the same exception using ActiveMQ 5.13.2 Web Console.
>
> On 17 March 2016 at 11:50, Derek Mahar  wrote:
> > Please note that I encountered this exception when using Firefox 45.0
> > to access ActiveMQ Web Console.
> >
> > On 17 March 2016 at 11:44, Derek Mahar  wrote:
> >> What might be the cause of the following UnsupportedOperationException
> >> that ActiveMQ 5.13.1 Web Console reports when I attempt to
> >> unsuccessfully purge the contents of a queue, but after browsing that
> >> same queue?
> >>
> >> URL sequence:
> >>
> >> http://0.0.0.0:8161/admin/browse.jsp?JMSDestination=client.order.queue
> >>
> http://0.0.0.0:8161/admin/purgeDestination.action?JMSDestination=client.order.queue&JMSDestinationType=queue&secret=5b118f61-5f26-4f49-ab54-7ca682eb5b7c
> >>
> >>
> >>  WARN |
> >> org.springframework.web.util.NestedServletException: Request
> >> processing failed; nested exception is
> >> java.lang.UnsupportedOperationException: Possible CSRF attack
> >> at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:977)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> >> at
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:856)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> >> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:622)[tomcat-servlet-api-8.0.24.jar:]
> >> at
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:841)[spring-webmvc-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> >> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-servlet-api-8.0.24.jar:]
> >> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.apache.activemq.web.AuditFilter.doFilter(AuditFilter.java:59)[activemq-web-5.13.1.jar:5.13.1]
> >> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> >> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.9.RELEASE.jar:4.1.9.RELEASE]
> >> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:102)[file:/opt/apache-activemq-5.13.1/webapps/admin/WEB-INF/classes/:]
> >> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.apache.activemq.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:47)[activemq-web-5.13.1.jar:5.13.1]
> >> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:542)[jetty-all-9.2.13.v20150730.jar:9.2.13.v20150730]
> >> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle