Re: Help with Camel Config routing using a custom ActiveMQ Message Property

2016-06-23 Thread Quinn Stevenson
I had a similar use case in the past, and I chose to route the "trash"
messages to a JMS Topic that didn't have any durable subscribers.  That way
I could create a subscriber when I needed it to see what was being
"trashed" - just be careful you don't create a durable subscriber or the
messages will build-up in that topic.

On Thu, Jun 23, 2016 at 7:09 PM, Tim Bain  wrote:

> To trash a message, do not send it to a DLQ!  DLQ != /dev/null.
>
> Instead, just ack the message after you consume it (without doing anything
> in response, just end the route or have your processor return null), which
> in the default Camel configuration happens automatically when your Camel
> route receives the message.  If your route is somehow set up for individual
> acks, you'd have to do the ack manually, but the code you've inherited
> would have an example of what to do if that were the case.
>
> Tim
> On Jun 23, 2016 8:14 AM, "Hassen Bennour" 
> wrote:
>
> > Hello,
> >
> > You can route messages following messages properties with filtered
> > destinations  http://activemq.apache.org/virtual-destinations.html
> > or camel  http://activemq.apache.org/sample-camel-routes.html
> > http://camel.apache.org/message-filter.html
> >
> > to trash a message i think you can route it to DLQ or another "trash
> queue"
> > or simply if it not correspond to any filtered Destination selector or
> > route it will not been forwarded, loosed.
> >
> > for example :
> > 
> > 
> > 
> > 
> > 
> > * *
> > 
> > * *
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > if you remove the filter 1 and a if a message dont have a *clientID =
> > 'activemq' * it will be ignored.
> >
> >
> >
> > Kind regards.
> >
> > *BENNOUR HASSEN*
> >
> > *SOA **Architect **/ **Java **Software Engineer*
> >
> > 2016-06-23 14:47 GMT+02:00 daelliott :
> >
> > > I've taken over a project in which everyone that knows anything is
> gone.
> > > I'm new to ActiveMQ and have never used Camel before.
> > > I'm trying to do content message routing and have a sample of what I'm
> > > attempting to do but have a couple of questions.
> > >
> > > * How to access a custom ActiveMQ message property.
> > >Is what I have below correct?
> > >
> > > * How to trash a message  i.e. send to /dev/null
> > >
> > > This is what I have after going through all the documentation that I
> > could
> > > find.
> > > Any help is GREATLY appreciated.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://activemq.2283324.n4.nabble.com/Help-with-Camel-Config-routing-using-a-custom-ActiveMQ-Message-Property-tp4713278.html
> > > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> > >
> >
>



-- 
Quinn Stevenson
qu...@pronoia-solutions.com
(801) 244-7758


Re: Difficulty porting example amqp/java publisher to new project

2016-06-23 Thread Tim Bain
If you take a thread dump after that last log line appears, where is it
stuck?  (Ideally post the full stack trace, if you can.)

Also, is your second producer running on the same machine?  Any chance the
host simply isn't reachable due to routing/firewall/etc?
On Jun 23, 2016 1:28 PM, "b4n4n4p4nd4"  wrote:

Basic assumption about production requirements... we're supposed to be able
to demonstrate that our project can send its messages out over amqp and have
them received by a broker on tomEE. As best we can tell this implies the
broker of choice is activemq and because of other requirements for being
able to show the same thing for websphere, we're assuming that the protocol
is amqp, and off we go clicking away.

Using apache-activemq-5.13.3-bin.zip, Windows 7, JVM 1.8 (but we can step
back to 1.7 if necessary), no server yet, just trying to send messages to a
broker on localhost.

Broker running from "%amqhome%\bin\activemq start"
Sample eclipse project created using examples\amqp\java\...\*.java

Dependencies for example project are:
activemq-all-5.13.3.jar
netty-all-4.0.21.Final.jar
proton-j-0.12.1.jar
qpid-jms-client-0.9.0.jar

Everything runs smoothly and with a couple minor tweaks to the loops, it
happily putters all day producing and consuming messages with the broker.
Even having twin publishers works fine without creating any apparent
conflict with the broker, and the listener is able to pick it all up.

Here's where I run into a problem:
I ported the content of the publisher's main method to my other project's
sendData method with the intention/belief that it would allow the messages
to start showing up upon being triggered by the other project. Same code,
same imports, same jars added to the classpath. It doesn't. It gets stuck on
the connection.start() line. No exceptions thrown.
I notice that the log output is different. We're both using slf4j. I strip
out activemq-all and replace it with activemq-client, activeio-core,
geronimo-jms_1.1_spec-1.1. The logging output returns to the way I had it,
but still no luck. It still hangs on connection.start().

Broker tends to spit this out:
 WARN | Transport Connection to: tcp://127.0.0.1:56966 failed:
org.apache.activemq.transport.InactivityIOException: Channel was inactive
for too (>3) long: tcp://127.0.0.1:56966

Last thing I can print before the start command is the message, then netty
goes nutty with debug logging, and there's nothing to go on.

message-payload: blah blah blah
DEBUG [io.netty.util.internal.logging.InternalLoggerFactory debug] Using
SLF4J as the default logging framework
DEBUG [io.netty.channel.MultithreadEventLoopGroup debug]
-Dio.netty.eventLoopThreads: 16
DEBUG [io.netty.util.internal.PlatformDependent0 debug]
java.nio.Buffer.address: available
DEBUG [io.netty.util.internal.PlatformDependent0 debug]
sun.misc.Unsafe.theUnsafe: available
DEBUG [io.netty.util.internal.PlatformDependent0 debug]
sun.misc.Unsafe.copyMemory: available
DEBUG [io.netty.util.internal.PlatformDependent0 debug]
java.nio.Bits.unaligned: true
DEBUG [io.netty.util.internal.PlatformDependent debug]
Platform: Windows
DEBUG [io.netty.util.internal.PlatformDependent debug] Java
version: 8
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.noUnsafe: false
DEBUG [io.netty.util.internal.PlatformDependent debug]
sun.misc.Unsafe: available
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.noJavassist: false
DEBUG [io.netty.util.internal.PlatformDependent debug]
Javassist: unavailable
DEBUG [io.netty.util.internal.PlatformDependent debug] You
don't have Javassist in your class path or you don't have enough permission
to load dynamically generated classes.  Please ch
eck the configuration for better performance.
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.tmpdir: C:\Users\admin\AppData\Local\Temp (java.io.tmpdir)
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.bitMode: 64 (sun.arch.data.model)
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.noPreferDirect: false
DEBUG [io.netty.channel.nio.NioEventLoop debug]
-Dio.netty.noKeySetOptimization: false
DEBUG [io.netty.channel.nio.NioEventLoop debug]
-Dio.netty.selectorAutoRebuildThreshold: 512
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]
-Dio.netty.allocator.numHeapArenas: 4
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]
-Dio.netty.allocator.numDirectArenas: 4
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]
-Dio.netty.allocator.pageSize: 8192
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]
-Dio.netty.allocator.maxOrder: 11
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]
-Dio.netty.allocator.chunkSize: 16777216
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]
-Dio.netty.allocator.tinyCacheSize: 512
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]
-Dio.netty.allocator.smallCacheSize: 256
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]
-Dio.netty.allocator.norm

Re: Help with Camel Config routing using a custom ActiveMQ Message Property

2016-06-23 Thread Tim Bain
To trash a message, do not send it to a DLQ!  DLQ != /dev/null.

Instead, just ack the message after you consume it (without doing anything
in response, just end the route or have your processor return null), which
in the default Camel configuration happens automatically when your Camel
route receives the message.  If your route is somehow set up for individual
acks, you'd have to do the ack manually, but the code you've inherited
would have an example of what to do if that were the case.

Tim
On Jun 23, 2016 8:14 AM, "Hassen Bennour"  wrote:

> Hello,
>
> You can route messages following messages properties with filtered
> destinations  http://activemq.apache.org/virtual-destinations.html
> or camel  http://activemq.apache.org/sample-camel-routes.html
> http://camel.apache.org/message-filter.html
>
> to trash a message i think you can route it to DLQ or another "trash queue"
> or simply if it not correspond to any filtered Destination selector or
> route it will not been forwarded, loosed.
>
> for example :
> 
> 
> 
> 
> 
> * *
> 
> * *
> 
> 
> 
> 
> 
> 
>
> if you remove the filter 1 and a if a message dont have a *clientID =
> 'activemq' * it will be ignored.
>
>
>
> Kind regards.
>
> *BENNOUR HASSEN*
>
> *SOA **Architect **/ **Java **Software Engineer*
>
> 2016-06-23 14:47 GMT+02:00 daelliott :
>
> > I've taken over a project in which everyone that knows anything is gone.
> > I'm new to ActiveMQ and have never used Camel before.
> > I'm trying to do content message routing and have a sample of what I'm
> > attempting to do but have a couple of questions.
> >
> > * How to access a custom ActiveMQ message property.
> >Is what I have below correct?
> >
> > * How to trash a message  i.e. send to /dev/null
> >
> > This is what I have after going through all the documentation that I
> could
> > find.
> > Any help is GREATLY appreciated.
> >
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/Help-with-Camel-Config-routing-using-a-custom-ActiveMQ-Message-Property-tp4713278.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>


Difficulty porting example amqp/java publisher to new project

2016-06-23 Thread b4n4n4p4nd4
Basic assumption about production requirements... we're supposed to be able
to demonstrate that our project can send its messages out over amqp and have
them received by a broker on tomEE. As best we can tell this implies the
broker of choice is activemq and because of other requirements for being
able to show the same thing for websphere, we're assuming that the protocol
is amqp, and off we go clicking away.

Using apache-activemq-5.13.3-bin.zip, Windows 7, JVM 1.8 (but we can step
back to 1.7 if necessary), no server yet, just trying to send messages to a
broker on localhost.

Broker running from "%amqhome%\bin\activemq start"
Sample eclipse project created using examples\amqp\java\...\*.java

Dependencies for example project are:
activemq-all-5.13.3.jar
netty-all-4.0.21.Final.jar
proton-j-0.12.1.jar
qpid-jms-client-0.9.0.jar

Everything runs smoothly and with a couple minor tweaks to the loops, it
happily putters all day producing and consuming messages with the broker.
Even having twin publishers works fine without creating any apparent
conflict with the broker, and the listener is able to pick it all up.

Here's where I run into a problem:
I ported the content of the publisher's main method to my other project's
sendData method with the intention/belief that it would allow the messages
to start showing up upon being triggered by the other project. Same code,
same imports, same jars added to the classpath. It doesn't. It gets stuck on
the connection.start() line. No exceptions thrown.
I notice that the log output is different. We're both using slf4j. I strip
out activemq-all and replace it with activemq-client, activeio-core,
geronimo-jms_1.1_spec-1.1. The logging output returns to the way I had it,
but still no luck. It still hangs on connection.start().

Broker tends to spit this out:
 WARN | Transport Connection to: tcp://127.0.0.1:56966 failed:
org.apache.activemq.transport.InactivityIOException: Channel was inactive
for too (>3) long: tcp://127.0.0.1:56966

Last thing I can print before the start command is the message, then netty
goes nutty with debug logging, and there's nothing to go on.

message-payload: blah blah blah
DEBUG [io.netty.util.internal.logging.InternalLoggerFactory debug] Using
SLF4J as the default logging framework
DEBUG [io.netty.channel.MultithreadEventLoopGroup debug]  
-Dio.netty.eventLoopThreads: 16
DEBUG [io.netty.util.internal.PlatformDependent0 debug]   
java.nio.Buffer.address: available
DEBUG [io.netty.util.internal.PlatformDependent0 debug]   
sun.misc.Unsafe.theUnsafe: available
DEBUG [io.netty.util.internal.PlatformDependent0 debug]   
sun.misc.Unsafe.copyMemory: available
DEBUG [io.netty.util.internal.PlatformDependent0 debug]   
java.nio.Bits.unaligned: true
DEBUG [io.netty.util.internal.PlatformDependent debug]
Platform: Windows
DEBUG [io.netty.util.internal.PlatformDependent debug] Java
version: 8
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.noUnsafe: false
DEBUG [io.netty.util.internal.PlatformDependent debug]
sun.misc.Unsafe: available
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.noJavassist: false
DEBUG [io.netty.util.internal.PlatformDependent debug]
Javassist: unavailable
DEBUG [io.netty.util.internal.PlatformDependent debug] You
don't have Javassist in your class path or you don't have enough permission
to load dynamically generated classes.  Please ch
eck the configuration for better performance.
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.tmpdir: C:\Users\admin\AppData\Local\Temp (java.io.tmpdir)
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.bitMode: 64 (sun.arch.data.model)
DEBUG [io.netty.util.internal.PlatformDependent debug]
-Dio.netty.noPreferDirect: false
DEBUG [io.netty.channel.nio.NioEventLoop debug]   
-Dio.netty.noKeySetOptimization: false
DEBUG [io.netty.channel.nio.NioEventLoop debug]   
-Dio.netty.selectorAutoRebuildThreshold: 512
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]  
-Dio.netty.allocator.numHeapArenas: 4
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]  
-Dio.netty.allocator.numDirectArenas: 4
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]  
-Dio.netty.allocator.pageSize: 8192
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]  
-Dio.netty.allocator.maxOrder: 11
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]  
-Dio.netty.allocator.chunkSize: 16777216
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]  
-Dio.netty.allocator.tinyCacheSize: 512
DEBUG [io.netty.buffer.PooledByteBufAllocator debug]  
-Dio.netty.allocator.smallCacheSize: 256
DEBUG [io.nett

kahaDB on vmQueueCursol

2016-06-23 Thread Naruhiro Yoneshige
Hi 
I got a question from my client.

My system set the vmQueueCursol as follows:
activemq.xml 
    
     
  
     
    

I recognize this make the queue processing only memory.
However the kahaDB is created and journal file is created without set the
"storeUsage limit" parameter.

My question is kahaDB is used even the vmQueueCursol setting?

Best Regards,
Naruhiro
 



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


Re: kahadb.log files not cleaning up on scheduler store

2016-06-23 Thread Timothy Bish

On 06/22/2016 09:59 AM, abhijith wrote:

Hi,

We have deployed ActiveMQ v5.6 and it has been running for last 3 years.  We
are in the process of upgrading to Artemis, but facing an issue currently
with deployed version.
Can you clarify here, you mention Artemis but the question seems to 
relate only to ActiveMQ 5.x



We are sending messages with AMQ_SCHEDULED_DELAY header to topic and have
used retrypolicy on the consumer side.  We also have virtual destinations
defined for the topic, which forwards messages to two queues.  We are seeing
every message sent is landing in scheduler store and is not cleaning up.  We
can see messages itself made it to consumer without any issue.   Not able to
figure out why activemq is not cleaning up those files.  Any insight would
be really helpful


If this is still using 5.6 then there are plenty of fixes for store 
cleanup in the latest releases so upgrading to 5.13.3 would be good 
first start.




Below post helped me find all the details on why activemq uses two stores in
v5.6
http://activemq.2283324.n4.nabble.com/Enormous-amount-of-db-xxx-log-files-in-quot-scheduler-quot-directory-td4703259.html

Thanks
Abhi



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/kahadb-log-files-not-cleaning-up-on-scheduler-store-tp4713249.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.




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



Re: Help with Camel Config routing using a custom ActiveMQ Message Property

2016-06-23 Thread Hassen Bennour
Hello,

You can route messages following messages properties with filtered
destinations  http://activemq.apache.org/virtual-destinations.html
or camel  http://activemq.apache.org/sample-camel-routes.html
http://camel.apache.org/message-filter.html

to trash a message i think you can route it to DLQ or another "trash queue"
or simply if it not correspond to any filtered Destination selector or
route it will not been forwarded, loosed.

for example :





* *

* *







if you remove the filter 1 and a if a message dont have a *clientID =
'activemq' * it will be ignored.



Kind regards.

*BENNOUR HASSEN*

*SOA **Architect **/ **Java **Software Engineer*

2016-06-23 14:47 GMT+02:00 daelliott :

> I've taken over a project in which everyone that knows anything is gone.
> I'm new to ActiveMQ and have never used Camel before.
> I'm trying to do content message routing and have a sample of what I'm
> attempting to do but have a couple of questions.
>
> * How to access a custom ActiveMQ message property.
>Is what I have below correct?
>
> * How to trash a message  i.e. send to /dev/null
>
> This is what I have after going through all the documentation that I could
> find.
> Any help is GREATLY appreciated.
>
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Help-with-Camel-Config-routing-using-a-custom-ActiveMQ-Message-Property-tp4713278.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Help with Camel Config routing using a custom ActiveMQ Message Property

2016-06-23 Thread daelliott
I've taken over a project in which everyone that knows anything is gone.  
I'm new to ActiveMQ and have never used Camel before.  
I'm trying to do content message routing and have a sample of what I'm 
attempting to do but have a couple of questions.

* How to access a custom ActiveMQ message property.
   Is what I have below correct?

* How to trash a message  i.e. send to /dev/null

This is what I have after going through all the documentation that I could
find.
Any help is GREATLY appreciated.







--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Help-with-Camel-Config-routing-using-a-custom-ActiveMQ-Message-Property-tp4713278.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Queues with empty name appear in web console

2016-06-23 Thread Tim Bain
I personally have never seen this behavior on the projects where I've used
5.6.0, 5.8.0, and 5.9.1.  Obviously those are different versions than the
ones you're using, but in the two years I've been monitoring this list I've
also never heard of anyone see this in any version.  So since you can't
pinpoint an action that triggers it, my default assumption is that it's
something related to your environment (such as an unintended interaction
with a browser plugin) rather than a bug in ActiveMQ.

If you can pinpoint specific steps that reliably reproduce the problem,
please post back here and we can try to figure out what's going on.  And in
the meantime, thankfully the misbehavior is pretty benign and you can
safely just ignore those extra destinations.

Tim
On Jun 22, 2016 7:32 PM, "RuralHunter"  wrote:

> No, they don't come back immediately if I delete them. But they will appear
> occasionally when activemq is running in steady status. There is no easy
> observed trigger as far as I know such as restart etc. I don't know if it
> is
> triggered by admin console reloading since we always need to reload the
> admin console if we need to check the status of queues.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Queues-with-empty-name-appear-in-web-console-tp4713148p4713266.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>