Re: ActiveMQ NMS Documentation Links Broken
Thanks, Justin. That's working for me now. Had to hit the refresh button a couple of times to get my cache cleared out. How about you, Luc? On Tue, Apr 23, 2019, 9:43 AM Justin Bertram wrote: > Try it now. > > > Justin > > On Tue, Apr 23, 2019 at 10:49 AM Luc Hebert > wrote: > > > Hi Jim, > > Yeah drilling down to the API being broken is what I'm referring to. > > > > Luc > > > > On Tue., Apr. 23, 2019, 11:18 a.m. Jim Gomes, wrote: > > > > > Hi Luc, > > > > > > The link you posted seems to be working for me, however, if I drill > down > > a > > > little further, I do see that the generated API pages are not showing > up. > > > > > > https://activemq.apache.org/components/nms/nms-api > > > > > > Is this what you are referring to? > > > > > > Best, > > > Jim > > > > > > On Tue, Apr 23, 2019, 7:53 AM Luc Hebert > > wrote: > > > > > > > Hello, > > > > The ActiveMQ NMS Documentation Links appear to be broken, could > anyone > > > > point me to working documentation for this please? > > > > https://activemq.apache.org/components/nms/documentation > > > > > > > > *---* > > > > > > > > *Luc Hebert* > > > > > > > > > >
Re: ActiveMQ NMS Documentation Links Broken
Hi Luc, The link you posted seems to be working for me, however, if I drill down a little further, I do see that the generated API pages are not showing up. https://activemq.apache.org/components/nms/nms-api Is this what you are referring to? Best, Jim On Tue, Apr 23, 2019, 7:53 AM Luc Hebert wrote: > Hello, > The ActiveMQ NMS Documentation Links appear to be broken, could anyone > point me to working documentation for this please? > https://activemq.apache.org/components/nms/documentation > > *---* > > *Luc Hebert* >
Re: What version of Apache.NMS.ActiveMQ was compatible?
That version should be compatible. On Wed, Oct 24, 2018, 2:08 PM SMerrill8 wrote: > Currently, we use a vendor supplied enterprise level application which > implements ActiveMQ 5.10.0 as a server. > I am connecting to it by using Apache.NMS.ActiveMQ 1.7.2.4108 as a C# .NET > client. > I am having a problem consuming an ecologic.jms application queue from C#. > I > wish to make certain that I am not using an incompatible combination. > Which version of Apache.NMS.ActiveMQ was compatible with ActiveMQ 5.10.0 at > the time of release? > > > > -- > Sent from: > http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Re: WCF NMS with web socket
The first question is what problem are you trying to solve? On Sun, Aug 13, 2017 at 8:26 AM orwrote: > Hi, > > I would like to know if it is possible to use the NMS WCF library with web > socket as binding, in order to connect to ActiveMQ. > > > Thanks, > Or > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/WCF-NMS-with-web-socket-tp4729655.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
Re: ActiveMQ NMS and Failure Recovery
I think you may be able to remove a lot of your exception handling code if you turn on failover:. It's so universal, I'm almost tempted to propose making it the default, and you would have to say nofailover: if you didn't want it. On Thu, Oct 13, 2016 at 8:53 AM magmasystemswrote: > Thanks, Jim. If failover works with a single instance, then I surely did > reinvent the wheel :-) > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-and-Failure-Recovery-tp4717704p4717869.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
Re: ActiveMQ NMS and Failure Recovery
Yes, failover works on a single instance. I think I mentioned that in my first reply. You don't need to list two brokers. You just need to have the failover: keyword in the connection URI. On Thu, Oct 13, 2016, 7:49 AM Tim Bainwrote: > Yes, the failover transport works in all three dialects (Java, .NET, and > C++). > > On Oct 13, 2016 7:08 AM, "magmasystems" > wrote: > > > Thanks guys. As I mentioned, the devs tend to do stuff on their laptops > > without running multiple instances of ActiveMQ. They basically go to the > > ActiveMQ directory, run the activemq.bat file, do some debugging, and > then > > CTRL+C out of ActiveMQ. If there are any patterns or tricks we could use > to > > get automatic failover out of a single instance, I would love to know > about > > it. Could you do something like: > > > > failover:(tcp://localhost:61616,tcp://remotehost:61616) > > > > H ... according to > > http://activemq.apache.org/failover-transport-reference.html, you should > > be > > able to. But, will that work with ActiveMQ NMS? > > > > -marc > > > > > > > > -- > > View this message in context: http://activemq.2283324.n4. > > nabble.com/ActiveMQ-NMS-and-Failure-Recovery-tp4717704p4717859.html > > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > >
Re: ActiveMQ NMS and Failure Recovery
It seems like you reinvented the wheel a little bit there, but I'm glad you got it to work for you. Cheers! On Wed, Oct 12, 2016, 8:36 AM magmasystemswrote: > Thanks Jim and Tim. I managed to hook up a poor-man's recover mechanism. > Our > application uses a framework that sits over the various low-level messaging > APIs, such ActiveMQ NMS, Tibco EMS .NET client, and the .NET RabbitMQ > client. So we actually have thin "proxy objects" sitting on top of the > native MessageConsumers and MessageProducers. When we detect a broker > failure, we instantiate a new connection and new sessions, and we recreate > the MessageConsumers and MessageProducers that the application was using. > Not the most elegant solution, but it was accomplished in a few lines of > code and seems to work. > > The most difficult thing to do (which is not too difficult, and only > involved finding the correct combination of BindingFlags to use) is to copy > the listener from the old MessageConsumer to the new MessageConsumer. > > var handler = typeof(MessageConsumer).GetField("listener", > BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.NonPublic > | > BindingFlags.GetField).GetValue(nativeMessageConsumer); > newMessageConsumer.Listener += handler; > > So > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-and-Failure-Recovery-tp4717704p4717848.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
Re: ActiveMQ NMS and Failure Recovery
Another technique to try when hitting a breakpoint is to not freeze all of your threads. Let the NMS worker threads continue running in the background so they are able to respond to the KeepAlive requests from the broker. Otherwise, your client will be kicked off from the broker. Visual Studio supports the ability to let background threads continue to run and only break certain threads for debugging. However, even though you client gets kicked off, it should go into failover mode and attempt to reconnect once you start running your application again. It will need a certain amount of time in order to accomplish this, so hitting Step Over line-by-line debugging won't give it enough time to reconnect. You don't have to try to reestablish all of the connections inside of your exception handler. That would be redundant to what the failover code already does. It just needs processor time in order to do it. This seems like a debugging issue, and not really a bug in the client. On Wed, Oct 12, 2016, 6:16 AM Tim Bainwrote: > As Jim said, the failover transport should ensure that your client > reconnects even if the broker disconnects the client due to a > breakpoint-induced timeout. If you're able to isolate specific steps or > sequences of events that result in that not happening, or to gather more > detailed information about the symptoms of the failed reconnect, it might > be possible for someone to figure out what's causing the behavior and fix > it. As always when debugging something with no obvious cause, the more > detail you can provide, the better the odds of someone figuring out what > the problem is. > > Also: tell your developers to stop getting coffee while they're debugging! > The clock is ticking when you hit your first breakpoint, because as you've > seen, there's a pretty narrow timeout window before the broker declares > your client dead and disconnects you. Do your thing and then detach, as > quickly as you can. > > One technique I use (which might or might not be available in Visual > Studio; I use Eclipse) is to use custom code in the condition of > conditional breakpoints that will add a custom log line (to see the value > of a variable, for example) but then always return false (i.e. don't stop > at this breakpoint), which lets me add custom logging anywhere I want it > without causing timeouts. Obviously there are some technology differences > between our setups, so YMMV. > > Tim > > On Oct 10, 2016 8:32 AM, "magmasystems" > wrote: > > > Thanks, Jim. I neglected to add that we are using the failover URI in > > production. The main problem seems to be around surviving debugging. For > > instance, I someone is debugging a service, and goes away for a cup of > > coffee for a few minutes, they will invariably find that the broker has > > send > > an NMSException. > > > > The pseudo-code for what we are trying to do is below. Let's assume that > > the > > developer is working on his own laptop, with a locally-installed single > > instance of ActiveMQ. > > > > // When initially creating a connection, we set the NMS > > ExceptionListener handler > > this.TheConnection.ExceptionListener += this.OnConnectionException; > > > > // This will get called when we get a break in the connection > > public virtual void OnConnectionException(Exception exception) > > { > > if (exception is NMSException) > > this.TryExceptionRepair(exception as NMSException); > > } > > > > private void TryExceptionRepair(NMSException nmsException) > > { > >// This is where we want to try to re-establish connections, > > sessions, etc > > } > > > > > > Let's say that we have a single Connection, a single Session that is > > associated with the connection, and a number of MessageConsumers and > > MessageProducers that were created by that Session. > > > > Is there a well-known pattern for re-establishing the environment when > the > > connection is broker? > > > > Also, any advice regarding the URI is welcome. > > > > Thanks, > > > > Marc > > > > > > > > -- > > View this message in context: http://activemq.2283324.n4. > > nabble.com/ActiveMQ-NMS-and-Failure-Recovery-tp4717704p4717707.html > > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > >
Re: ActiveMQ NMS and Failure Recovery
The first thing I notice is that you haven't actually enabled failover. The connection URI should be based on this: activemq:failover:tcp://hostname:61616 The inclusion of failover: is important. Beyond that, if you break inside of a debugger, you most likely will be disconnected by the broker. So I'm not sure what you are asking. Do you want to survive breakpoints in a debugger, or do you want normal failover in production? On Sun, Oct 9, 2016, 9:00 AM magmasystemswrote: > Hello all, > > As we prepare to ship our new product that uses ActiveMQ NMS heavily, I am > trying to harden the code against possible failures. One of the things that > our developers have noticed (and others in this group may have noticed) is > that it is common to get NMSExceptions when you are stopped at a breakpoint > for a while in Visual Studio. The connection is lost, and often times, we > need to restart our services. > > Our typical connection string is this: > > > > activemq:tcp://myserver:61616?transport.useInactivityMonitor=falseamp;keepAlive=true > > I have a few questions: > > 1) Let's say that we have a few cached consumers. If a connection faulted, > and we need to open a new connection, I assume that we also need to create > new sessions and therefore, create new consumers and producers? Or is there > any way to take an existing session and associate it with a new connection? > > 2) What are the best patterns for failure recovery, especially when a > connection goes down because of a "keep-alive" violation? Do we need to > only > create a new connection? Do we need to recreate all sessions? Do we need to > recreate all consumers and producers? > > 3) Are there any other parameters that you feel that I should add to my > URI? > I see that there are parameters like: > > wireFormat.maxInactivityDuration (set to either a large number or to -1 ... > people have tried both) > maxInactivityDurationInitalDelay > > Thanks very much for any advice. > > -marc > > > > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-and-Failure-Recovery-tp4717704.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
Re: [ANNOUNCE] Apache Artemis 1.4.0 Released
Yes, it'll take some amount of time. Not sure how much. As I was browsing manually, I noticed that there are synchronization errors. Most mirrors had the 1.3.0 version and not the 1.4.0 version (as expected). However, the mirror that I found 1.4.0 on did *not* have 1.3.0. That was surprising. Do the mirrors ditch the older version when a newer one comes online? I'm not sure how that works. On Tue, Sep 13, 2016 at 2:07 PM Clebert Suconic <clebert.suco...@gmail.com> wrote: > I tested before sending the ANNOUNCE, but I guess not all mirrors have it. > > I believe it usually takes some time before it syncs them all. I guess > that's normal? > > On Tue, Sep 13, 2016 at 4:55 PM, Jim Gomes <jgo...@apache.org> wrote: > > Disregard. There seems to be synchronizing issues between the mirrors. > Some > > mirrors have it, some don't. I had to manually browse the mirrors to find > > one that did. > > > > On Tue, Sep 13, 2016 at 1:48 PM Jim Gomes <jgo...@apache.org> wrote: > > > >> The download links are still broken. How long before they will be > active? > >> > >> > >> On Tue, Sep 13, 2016 at 8:40 AM Clebert Suconic < > clebert.suco...@gmail.com> > >> wrote: > >> > >>> Apache ActiveMQ Artemis 1.4.0 has been released. > >>> > >>> There are a lot of improvements included in this release: > >>> > >>> - Possibility of using a max size for paging, and monitoring disk > >>> sizes and improving flow control > >>> - Interceptors support for MQTT > >>> - Reload configuration support > >>> > >>> The artemis sub-project website has been updated: > >>> > >>> http://activemq.apache.org/artemis/ > >>> > >>> > >>> > >>> For a complete report of changes: > >>> > >>> > >>> > https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12315920=12336052 > >>> > >>> > >>> And the documentation can be found here: > >>> > >>> https://activemq.apache.org/artemis/docs.html > >>> > >>> > >>> > >>> Regards > >>> > >>> > >>> > >>> Clebert Suconic > >>> > >> > > > > -- > Clebert Suconic >
Re: [ANNOUNCE] Apache Artemis 1.4.0 Released
Disregard. There seems to be synchronizing issues between the mirrors. Some mirrors have it, some don't. I had to manually browse the mirrors to find one that did. On Tue, Sep 13, 2016 at 1:48 PM Jim Gomes <jgo...@apache.org> wrote: > The download links are still broken. How long before they will be active? > > > On Tue, Sep 13, 2016 at 8:40 AM Clebert Suconic <clebert.suco...@gmail.com> > wrote: > >> Apache ActiveMQ Artemis 1.4.0 has been released. >> >> There are a lot of improvements included in this release: >> >> - Possibility of using a max size for paging, and monitoring disk >> sizes and improving flow control >> - Interceptors support for MQTT >> - Reload configuration support >> >> The artemis sub-project website has been updated: >> >> http://activemq.apache.org/artemis/ >> >> >> >> For a complete report of changes: >> >> >> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12315920=12336052 >> >> >> And the documentation can be found here: >> >> https://activemq.apache.org/artemis/docs.html >> >> >> >> Regards >> >> >> >> Clebert Suconic >> >
Re: [ANNOUNCE] Apache Artemis 1.4.0 Released
The download links are still broken. How long before they will be active? On Tue, Sep 13, 2016 at 8:40 AM Clebert Suconicwrote: > Apache ActiveMQ Artemis 1.4.0 has been released. > > There are a lot of improvements included in this release: > > - Possibility of using a max size for paging, and monitoring disk > sizes and improving flow control > - Interceptors support for MQTT > - Reload configuration support > > The artemis sub-project website has been updated: > > http://activemq.apache.org/artemis/ > > > > For a complete report of changes: > > > https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12315920=12336052 > > > And the documentation can be found here: > > https://activemq.apache.org/artemis/docs.html > > > > Regards > > > > Clebert Suconic >
Re: Apache.NMS.ActiveMQ Threads (C#)
megakid, You stated in your message "We are trying to establish why the C# NMS library has created all these threads. " but you are using the Obvs library to create connections for you. It is just as likely that this library is creating the high number of threads. If you want to narrow down a possible bug in the NMS implementation, it might be good to create a simpler test harness without the Obvs library. My usage of the NMS library does not create a higher than expected number of task threads. I would suggest also that you keep your consumer object around for as long as you need it instead of throwing it away as a temp object in the following line of code: session.CreateConsumer(dest).Listener += [ourHandler]; Keeping it around and manually maintaining its lifetime will allow you to control when it is destroyed instead of being garbage collected unexpectedly. For reference, here is sample code for synchronous consumer creation (it could be adapted for asynchronous listeners): http://activemq.apache.org/nms/nms-simple-synchornous-consumer-example.html Good luck with your debugging. On Fri, Nov 27, 2015 at 1:57 PM, Timothy Bishwrote: > On 11/27/2015 03:29 PM, megakid wrote: > > Hi all, > > > > I'm doing a deep dive debugging exercise on Apache.NMS.ActiveMQ 1.7.1 at > the > > moment and struggling! We recently saw one of our new services in the > wild > > with over 300 threads named as "ActiveMQ Task" with > > > "Apache.NMS.ActiveMQ.dll!Apache.NMS.ActiveMQ.Threads.DedicatedTaskRunner.Run" > > as the top stack frame. We are trying to establish why the C# NMS > library > > has created all these threads. Some questions... > > > > I cannot find the Apache.NMS.ActiveMQ source code anywhere, only some > out of > > date mentions/links - I assume it is not open sourced any more? > > > > I've spent all day trying to reproduce the issue but I can only ever get > a > > maximum of 1 thread per session at any point in time (as expected). I > am as > > sure as I can be that we are not creating more than 10 or so sessions > over a > > single, global connection (assume that for now) - we call, in short, > > session.CreateConsumer(dest).Listener += [ourHandler]; - in my debugging > > I've established that this creates a thread on CreateConsumer, then > throws > > that thread away and is replaced with a new one when the Listener += is > > executed - it doesn't seem to leak anything here. Are there any other > > scenarios (failure cases etc) where it may leak these threads? > > > > I have looked at the decompiled source to get an indication of when these > > threads are spawned and, ignoring `dedicatedTaskRunner = false` which I > know > > is possible, can only see the FailoverTask and the SessionExecutor that > uses > > the DedicatedTaskRunner (which creates threads named "ActiveMQ Task"). > > > > It is a very busy service so after consulting > > > http://activemq.apache.org/how-to-deal-with-large-number-of-threads-in-clients.html > > I thought it might be due to load - but I can't see where any of that > code > > can live inside NMS, am I right in thinking that the C# NMS library is > > designed to not have more than 1 thread per session (e.g. I should ignore > > that webpage)? > > > > In case anyone is interested, we are using the Obvs library to connect to > > ActiveMQ - the topic subscription part is here: > > > https://github.com/inter8ection/Obvs.ActiveMQ/blob/master/Obvs.ActiveMQ/MessageSource.cs > > > > Has anyone else had this issue and what did you do to diagnose it? > > > > Thanks very much! > > > > > > > > -- > > View this message in context: > http://activemq.2283324.n4.nabble.com/Apache-NMS-ActiveMQ-Threads-C-tp4704338.html > > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > > Code is here: > > http://svn.apache.org/repos/asf/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk > > Happy debugging > > -- > Tim Bish > Sr Software Engineer | RedHat Inc. > tim.b...@redhat.com | www.redhat.com > twitter: @tabish121 > blog: http://timbish.blogspot.com/ > >
Re: ActiveMQ and the Windows world
$private:finishconsumer.Receive([System.TimeSpan]::FromSeconds(30)) if(!$private:finishmsg) { write-warning "Did not receive finished message." $private:shouldcontinue = read-host -prompt "Press 'Y' to continue waiting" if($private:shouldcontinue -imatch "^Y") { continue } } break } } finally { if($private:finishconsumer) { $private:finishconsumer.Close() } } } function test-resetmsg($tripped = $false, $case = $global:testcase) { if(!(check-connectedtonms)) { return } send-resetmsg CMD3 $tripped $case if($tripped) { write-host "Text should read: Unknown" -b Yellow -f Black } else { handle-msglookup write-host "Text should read: OK" -b Green -f Black } waitfor-finishmsg send-resetmsg CMD4 $tripped $case if($tripped -ne $true) { handle-msglookup } write-host "Text should read: Unknown" -b Yellow -f Black waitfor-finishmsg send-resetmsg CMD1 $tripped $case if($tripped) { write-host "Text should read: Unknown" -b Yellow -f Black } else { handle-msglookup write-host "Text should read: STATE1" -b DarkRed -f White } waitfor-finishmsg send-resetmsg CMD2 $tripped $case if($tripped) { write-host "Text should read: Unknown" -b Yellow -f Black } else { handle-msglookup write-host "Text should read: OK" -b Green -f Black } waitfor-finishmsg send-resetmsg CMD3-CMD4-CMD2 $tripped $case if($tripped) { write-host "Text should read: Unknown" -b Yellow -f Black } else { handle-msglookup write-host "Text should read: OK" -b Green -f Black } waitfor-finishmsg send-resetmsg CMD3-CMD4-CMD2-CMD1 $tripped $case if($tripped) { write-host "Text should read: Unknown" -b Yellow -f Black } else { handle-msglookup write-host "Text should read: STATE1" -b DarkRed -f White } waitfor-finishmsg } -- 8< CUT HERE >8 --- On Thu, Oct 1, 2015 at 1:34 PM, Jarmo Sorvari <jarmo.sorv...@tamk.fi> wrote: > On 01.10.2015 16:48, Jim Gomes wrote: > >> You're welcome. You can use the NMS libraries from PowerShell. I've done >> it >> many times for writing test scripts and other things. It's actually quite >> easy. If you want some sample code, let me know. You can then take that >> into a full C# app with little difficulty. >> > > Thank you for the offer. I will look at this with our windows guy in the > near future! > > Jarmo > > > >> On Thu, Oct 1, 2015, 12:05 AM Jarmo Sorvari <jarmo.sorv...@tamk.fi> >> wrote: >> >> From: tbai...@gmail.com [mailto:tbai...@gmail.com] On Behalf Of Tim Bain >>>> Sent: 30. syyskuuta 2015 15:42 >>>> To: ActiveMQ Users >>>> Subject: Re: ActiveMQ and the Windows world >>>> >>>> Most people on both Windows and Linux use the Java or C++ client >>>> >>> libraries >>> >>>> to read and write messages from/to ActiveMQ. Do you have requirements >>>> that preclude that approach? If so, what are you trying to do and under >>>> >>> what >>> >>>> constraints, so we can try to help you find a solution that works for >>>> >>> you? >>> >>> >>> The need is to be able to use the same scripting language that our >>> windows >>> guy would use for the rest of the integration. A ready PowerShell module >>> would be ideal. Having to compile things or use Java (just to load a >>> message) creates a threshold of some sort. >>> >>> Thanks to Jim Gomes, too. We will look at the NMS library! >>> >>> Jarmo >>> >>> >>> Tim >>>> On Sep 30, 2015 3:21 AM, "Jarmo Sorvari" <jarmo.sorv...@tamk.fi> wrote: >>>> >>>> Hi >>>>> >>>>> Some Googling did not give me much on this, so I ask here: >>>>> >>>>> How do people here read and write the ActiveMQ from the windows >>>>> >>>> world? >>>> >>>>> Preferably using PowerShell, but anything goes... >>>>> >>>>> Tried to find STOMP implementations or native jms speakers, but it was >>>>> surprisingly scant. My present guess is that we would be best off >>>>> reading and writing queues using ActiveMQ's REST interface. Seems to >>>>> me, though, that in that case, running amq from the ServiceMix package >>>>> is not possible (how do you activate amq's REST there?), but rather >>>>> >>>> install >>> >>>> amq on its own. >>>> >>>>> Jarmo Sorvari >>>>> Tampere University of Applied Sciences Finland >>>>> >>>>> >
Re: ActiveMQ and the Windows world
You're welcome. You can use the NMS libraries from PowerShell. I've done it many times for writing test scripts and other things. It's actually quite easy. If you want some sample code, let me know. You can then take that into a full C# app with little difficulty. On Thu, Oct 1, 2015, 12:05 AM Jarmo Sorvari <jarmo.sorv...@tamk.fi> wrote: > > From: tbai...@gmail.com [mailto:tbai...@gmail.com] On Behalf Of Tim Bain > > Sent: 30. syyskuuta 2015 15:42 > > To: ActiveMQ Users > > Subject: Re: ActiveMQ and the Windows world > > > > Most people on both Windows and Linux use the Java or C++ client > libraries > > to read and write messages from/to ActiveMQ. Do you have requirements > > that preclude that approach? If so, what are you trying to do and under > what > > constraints, so we can try to help you find a solution that works for > you? > > > The need is to be able to use the same scripting language that our windows > guy would use for the rest of the integration. A ready PowerShell module > would be ideal. Having to compile things or use Java (just to load a > message) creates a threshold of some sort. > > Thanks to Jim Gomes, too. We will look at the NMS library! > > Jarmo > > > > Tim > > On Sep 30, 2015 3:21 AM, "Jarmo Sorvari" <jarmo.sorv...@tamk.fi> wrote: > > > > > Hi > > > > > > Some Googling did not give me much on this, so I ask here: > > > > > > How do people here read and write the ActiveMQ from the windows > > world? > > > Preferably using PowerShell, but anything goes... > > > > > > Tried to find STOMP implementations or native jms speakers, but it was > > > surprisingly scant. My present guess is that we would be best off > > > reading and writing queues using ActiveMQ's REST interface. Seems to > > > me, though, that in that case, running amq from the ServiceMix package > > > is not possible (how do you activate amq's REST there?), but rather > install > > amq on its own. > > > > > > Jarmo Sorvari > > > Tampere University of Applied Sciences Finland > > > >
Re: ActiveMQ and the Windows world
The NMS client library is a very popular way to connect to ActiveMQ. It runs on both .NET and Mono. You can find out more about it from here: http://activemq.apache.org/nms/nms.html On Wed, Sep 30, 2015, 5:41 AM Tim Bainwrote: > Most people on both Windows and Linux use the Java or C++ client libraries > to read and write messages from/to ActiveMQ. Do you have requirements that > preclude that approach? If so, what are you trying to do and under what > constraints, so we can try to help you find a solution that works for you? > > Tim > On Sep 30, 2015 3:21 AM, "Jarmo Sorvari" wrote: > > > Hi > > > > Some Googling did not give me much on this, so I ask here: > > > > How do people here read and write the ActiveMQ from the windows world? > > Preferably using PowerShell, but anything goes... > > > > Tried to find STOMP implementations or native jms speakers, but it was > > surprisingly scant. My present guess is that we would be best off reading > > and writing queues using ActiveMQ's REST interface. Seems to me, though, > > that in that case, running amq from the ServiceMix package is not > possible > > (how do you activate amq's REST there?), but rather install amq on its > own. > > > > Jarmo Sorvari > > Tampere University of Applied Sciences > > Finland > > >
Re: ActiveMQ .Net: Difference between NMSXGroupID and JMSXGroupID
Yes, this is expected behavior. The NMS API maps to the JMS API. It is not an exact implementation of JMS. It is it's own thing that has the same functionality as the JMS API. On Mon, Aug 17, 2015, 3:55 PM fmansoor faisal.mans...@gmail.com wrote: Hi everyone, I am trying to understand how the .Net Apache.NMS.ActiveMQ client handles standard JMS properties. Message group is properly set when I use NMSXGroupID property but not with JMSXGroupID. Is this expected? Shouldn't .Net client support the standard JMS header strings? Thanks. Faisal -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Net-Difference-between-NMSXGroupID-and-JMSXGroupID-tp4701166.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Xamarin: No IConnectionFactory implementation found for connection
The reason is that I don't have iOS devices. :-) Sorry, I can't help with that. All of the code should be portable, though. I'm glad you were able to get the code working on Android! On Sat, Aug 8, 2015, 6:51 PM olliog ogart...@clairvista.com wrote: I got a connection established via Stomp in a Xamarin.Android application. Great work, guys! I could re-use most of the C# messaging code I used in are regular .NET application. I now wonder what I should do for iOS? Is there are reason why the Apache.NMS source only contains projects for Xamarin.Android and not for Xamarin.iOS? What would you recommend me to do here? Thanks and best wishes, Oliver -- View this message in context: http://activemq.2283324.n4.nabble.com/Xamarin-No-IConnectionFactory-implementation-found-for-connection-tp4700428p4700619.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Xamarin: No IConnectionFactory implementation found for connection
I only experimented with the Stomp provider. I didn't have a chance to try out the MQTT provider. The Stomp provider definitely works, but if you have the time to look into the MQTT provider, that would be great! My understanding is that MQTT is meant for mobile devices with possibly bad connections. On Thu, Aug 6, 2015 at 7:36 PM, olliog ogart...@clairvista.com wrote: Ah. I see. I will check out Stomp then. I see that there is also a MQTT project for Android. Any recommendation of what is better suited for mobile? Stomp or MQTT? Thanks a lot, Oliver -- View this message in context: http://activemq.2283324.n4.nabble.com/Xamarin-No-IConnectionFactory-implementation-found-for-connection-tp4700428p4700543.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Xamarin: No IConnectionFactory implementation found for connection
You should use the Apache.NMS.Stomp provider for running on Android. It is 100% portable to Xamarin. On Tue, Aug 4, 2015 at 8:27 PM, olliog ogart...@clairvista.com wrote: Hi everyone, I could build Apache.NMS via the in 1.7 provided Android project. But when I tried to establish a connection to an ActiveMQ server, I got: No IConnectionFactory implementation found for connection A quick google search pointed me in the direction that Apache.NMS.ActiveMQ is needed for that to work. Is that correct and if so, is there a Xamarin project for that or how can I integrate that into a Xamarin solution? Thanks a lot for your help, Oliver -- View this message in context: http://activemq.2283324.n4.nabble.com/Xamarin-No-IConnectionFactory-implementation-found-for-connection-tp4700428.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Fwd: Warning from users@activemq.apache.org
I get these messages all the time, too. It's annoying. So far, they seem harmless. On Thu, Jul 9, 2015, 8:27 AM Tim Bain tb...@alumni.duke.edu wrote: Requesting the index of the last 100 messages and looking them up on Nabble has worked for me when I get them. On Jul 9, 2015 8:38 AM, Robbie Gemmell robbie.gemm...@gmail.com wrote: On 9 July 2015 at 14:34, Timothy Bish tabish...@gmail.com wrote: On 07/09/2015 09:29 AM, Tim Bain wrote: Every month or two I get a message like the one below indicating failure to deliver a few messages to me. Without me doing anything, everything goes right back to working normally, so I assume there's some transient failure somewhere, but I have no idea what it is. Do other people get these as well (i.e. this is an issue on the list-serv's side), or am I the only one (i.e. this is an issue on my email provider's side)? Tim Not just you, happens for me as well every so often. I have had a couple of these in the past. When actually following the instructions to request the tiny number of messages listed, the result came back empty too, so I've decided just to ignore them now. -- Forwarded message -- From: users-h...@activemq.apache.org Date: Thu, Jul 2, 2015 at 8:36 PM Subject: Warning from users@activemq.apache.org To: tbai...@gmail.com Hi! This is the ezmlm program. I'm managing the users@activemq.apache.org mailing list. I'm working for my owner, who can be reached at users-ow...@activemq.apache.org. Messages to you from the users mailing list seem to have been bouncing. I've attached a copy of the first bounce message I received. If this message bounces too, I will send you a probe. If the probe bounces, I will remove your address from the users mailing list, without further notice. I've kept a list of which messages from the users mailing list have bounced from your address. Copies of these messages may be in the archive. To retrieve a set of messages 123-145 (a maximum of 100 per request), send a short message to: users-get.123_...@activemq.apache.org To receive a subject and author list for the last 100 or so messages, send a short message to: users-in...@activemq.apache.org Here are the message numbers: 42325 42424 --- Enclosed is a copy of the bounce message I received. Return-Path: Received: (qmail 3677 invoked for bounce); 22 Jun 2015 13:17:41 - Date: 22 Jun 2015 13:17:41 - From: mailer-dae...@apache.org To: users-return-423...@activemq.apache.org Subject: failure notice -- Tim Bish Sr Software Engineer | RedHat Inc. tim.b...@redhat.com | www.redhat.com twitter: @tabish121 blog: http://timbish.blogspot.com/
Re: NMS InitialRedeliveryDelay doesn't seem to work
Thanks for reporting this. Could you log this in JIRA as a defect so we can track it there? On Mon, Jun 1, 2015, 9:07 AM daelliott my_fo...@outlook.com wrote: ActiveMQ v5.9.1 Apache.NMS v1.6.0.3083 The InitialRedeliveryDelay doesn't seem to work. I added a try...catch block to display the time and then re-throw so I could see what was going on. I'm looking to wait 5 seconds initially and then 5 seconds in between each attempt. You can see the first exception is immediately followed by the second and then 5 seconds in between. Here is my code and values. It doesn't matter whether UseExponentialBackOff is on or off. -- View this message in context: http://activemq.2283324.n4.nabble.com/NMS-InitialRedeliveryDelay-doesn-t-seem-to-work-tp4697140.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Activemq list of queues NMS .NET
Hello, The best way to get a list of topics and queues is by using the Statistics Plugin on the broker. Check the documentation here: http://activemq.apache.org/statisticsplugin.html On Mon, Apr 27, 2015 at 4:40 PM gokhaled89 gokhale...@gmail.com wrote: How do I get list of queues and topics using ActiveMQ NMS ( .NET ). Getting the list in JAVA is simple. But what about .NET. Thanks. -- View this message in context: http://activemq.2283324.n4.nabble.com/Activemq-list-of-queues-NMS-NET-tp4695682.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMS versioning and NuGet
The NMS.MSMQ provider is supported, and does compile with the latest NMS 1.7.0. It's just that a new binary hasn't been put out in a while. On Apr 30, 2015 10:05 PM, rjrizzuto raymond.rizz...@sig.com wrote: Thanks for the update. I am new to Apache.NMS and message oriented middleware in general. We currently are using MSMQs in a product, and finding it limiting. I'm looking at alternatives, and initally plan on using Apache.NMS with Apollo. If Apache.NMS.MSMQ was supported, I was going to use that as part of benchmarking the 2. I was also interested in the other providers in case Apollo didn't work out. ZeroMQ was one of the possibilities, though it seemed to lack some functionality that broker-based solutions provide, such as persistence. -- View this message in context: http://activemq.2283324.n4.nabble.com/NMS-versioning-and-NuGet-tp4695705p4695935.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ZeroMQ provider
If you need help in bull building the ZeroMQ provider, let me know. On Thu, Apr 30, 2015, 1:13 AM Timothy Bish tabish...@gmail.com wrote: On 04/29/2015 11:38 AM, rjrizzuto wrote: I saw https://issues.apache.org/jira/browse/AMQNET-333 in the release notes for Apache.NMS 1.7.0. Is there a binary available? I am evaluating a few queuing products, including ZeroMQ, so being able to create a performance test harness using Apache.NMS for all of them would be helpful. -- View this message in context: http://activemq.2283324.n4.nabble.com/ZeroMQ-provider-tp4695868.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. No, the maintainer has not done a formal release of that so you would need to build the binaries yourself. -- Tim Bish Sr Software Engineer | RedHat Inc. tim.b...@redhat.com | www.redhat.com twitter: @tabish121 blog: http://timbish.blogspot.com/
Re: NMS versioning and NuGet
The ZeroMQ provider isn't quite ready to be declared stable. There are still more things I want to do with it. It basically works, but due to the inherent asynchronous nature of ZeroMQ, it is difficult to create a deterministic workflow of knowing exactly when a sender and receiver are fully initialized. Any help is appreciated. On Thu, Apr 30, 2015, 3:17 AM Timothy Bish tabish...@gmail.com wrote: On 04/29/2015 01:50 PM, rjrizzuto wrote: I thought I saw that there is a new ZeroMQ provider in 1.7.0. Does the same issue of not having an owner apply to it as well? -- View this message in context: http://activemq.2283324.n4.nabble.com/NMS-versioning-and-NuGet-tp4695705p4695916.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. The creator of that provider has not started a formal release for it, I can't speak to its completeness are readiness for a release as I have not worked on it. -- Tim Bish Sr Software Engineer | RedHat Inc. tim.b...@redhat.com | www.redhat.com twitter: @tabish121 blog: http://timbish.blogspot.com/
Re: Apache.NMS.AMQP : an Apache NMS Provider for AMQP
+1 Thanks for all the hard work! On Thu, Aug 21, 2014 at 1:22 PM, Timothy Bish tabish...@gmail.com wrote: Great work Chuck!! Looking forward to seeing this make its way to a 1.0 release. On 08/21/2014 02:08 PM, Chuck Rolke wrote: === * Apache.NMS.AMQP : Apache NMS for AMQP Client Library * Initial Release Notes === 1.0 Welcome Welcome to Apache NMS AMQP! This NMS Provider will connect to the AMQP messaging protocol. NMS applications using this provider may communicate with Amqp Brokers such as Apache ActiveMQ and Apache Qpid qpidd, and messaging infrastructure such as Apache Qpid Dispatch Router. 2.0 Implementation Overview The AMQP Provider leverages the interop binding Apache Qpid .NET Binding for C++ Messaging. The .NET Binding is an interop layer that connects .NET programs to the Qpid native C++ protocol engine libraries. AMQP Provider source code is available at: svn co https://svn.apache.org/repos/asf/activemq/activemq-dotnet/ Apache.NMS.AMQP/trunk Apache.NMS.AMQP Notes and development history are recorded in: https://issues.apache.org/jira/browse/AMQNET-454 3.0 Getting Started 3.1 Installing Apache Qpid vendor files In order to use the AMQP Provider your application must have the Apache Qpid native and supporting libraries available on the path. These files are installed automatically during the nant installation of the Apache.Qpid vendor kit. 3.2 Selecting the correct Apache Qpid vendor files The Apache Qpid vendor files are shipped in two versions: * .NET 2.0 x86 Compiled with Visual Studio 2008 * .NET 4.0 x86 Compiled with Visual Studio 2010 Each of these kits is built for the 32-bit x86 platform using Release configurations. A typical kit holds: * The Apache Qpid interop library org.apache.qpid.messaging.dll * Apache Qpid/Proton library files qpid-proton.dll qpidclient.dll qpidcommon.dll qpidmessaging.dll qpidtypes.dll * Boost library files boost_chrono-vc100-mt-1_47.dll boost_date_time-vc100-mt-1_47.dll boost_program_options-vc100-mt-1_47.dll boost_system-vc100-mt-1_47.dll boost_thread-vc100-mt-1_47.dll 3.3 Building your Application A HelloWorld application is included in the Apache.NMS.AMQP development tree to get users off to a quick start. This project selects: Visual Studio : 2010 Configuration : Debug .NET Framework : 4.0 Platform : AnyCPU HelloWorld builds and runs on both 32-bit x86 and 64-bit x64 systems as long as the base project is built for the x86 Platform. The Apache Qpid subsystem will not load under .NET projects that specify the x64 Platform. 4.0 Using the Apache.NMS.AMQP Provider 4.1 Creating AMQP Connections Connections to AMQP brokers and endpoints are controlled by arguments to the ConnectionFactory constructor. By default connections use protocol amqp1.0. Uri connecturi = new Uri(amqp:tcp:localhost:5672); string clientID = abc; Hashtable options = new Hashtable(); options[username] = guest; options[password] = secret; IConnectionFactory factory = new NMSConnectionFactory(connecturi, clientID, options); Notes: * AMQP protocol version 0-10 is selected by 'options[protocol] = amqp0-10'. * In this release connection options are passed through an option table and not through the connect URI/URL. More information about connection options is available at: http://qpid.apache.org/components/programming/book/ connection-options.html 5.0 Next Steps * Include wiki pages describing the provider in http://activemq.apache.org/nms/ 6.0 Future Considerations * 64-bit x64 Apache Qpid vendor kit * Support for more robust object message formats * Transactions and message durability * Unit test/system tests -- Tim Bish Sr Software Engineer | RedHat Inc. tim.b...@redhat.com | www.redhat.com skype: tabish121 | twitter: @tabish121 blog: http://timbish.blogspot.com/
Re: Some messages sent to Topics are Lost
Check your clocks. They may be out of sync, and the messages may become stale and be ignored by a consumer. To test this, you can run the broker and client on the same machine. If that is not possible, add the TimestampPlugin to your broker. In NMS (I know you are using the Java client), there is a *consumer.nms.ignoreExpiration=true* parameter that can be added to the consumer topic destination that will consume expired messages. This is useful to work around clock synchronization problems. On Wed, Jun 18, 2014 at 8:58 AM, daltonch c...@2kgt.com wrote: I have a pretty simple setup. I have 1 Queue that a java application post a message on. I have a Listener on that queue which takes the message and post it to a Topic (does some stuff to it first). I then have several topic listeners configured, each one does something different with the message. Sometimes the message is never picked up by the Topic Listeners. The application that copies the message from the Queue to the Topic is the same process so there is not the issue of it not running. The frustrating part is I can startup the listeners, post some messages and they all make it to the Topic, then 5 minutes later I can post some messages and half of them make it, then 5 minutes later they will all make it. This is causing me to loose many messages and I have no idea where they are going. In the JMSAdmin console the Message Enqueued counter is incremented correctly with the number of messages sent to the topic but the Message Dequeued is always lower, exactly by the number of messages that I am losing. -- View this message in context: http://activemq.2283324.n4.nabble.com/Some-messages-sent-to-Topics-are-Lost-tp4682262.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ NMS Fails when User/Password Required
This code works, and it is used frequently. Following is a snippet from my own code. I recommend staying at the generic NMS API level, and not using ActiveMQ provider specific APIs. You will have much greater portability success between different NMS providers. IConnectionFactory cf = new NMSConnectionFactory(providerURLs, connectionID); IConnection connection = cf.CreateConnection(userName, password); Best, Jim On Thu, Jun 5, 2014 at 10:55 AM, pwalter patrick.wal...@nasa.gov wrote: ActiveMQ NMS fails when User/Password is required. ActiveMQ with JAVA works with same URL/user/pwd. Uri connecturi = new Uri(url); IConnectionFactory factory = new Apache.NMS.ActiveMQ.ConnectionFactory(connecturi); connection = factory.CreateConnection(user, password); connection.Start(); Error: Apache.NMS.ActiveMQ.ConnectionClosedException: The connection is already closed! Any Ideas ?? THANKS FOR YOUR QUICK RESPONSE!!! -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-Fails-when-User-Password-Required-tp4681728.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ NMS Fails when User/Password Required
I use the following template and use variable replacement at runtime: ${appname}-${hostname}-${guid} This way I can look in the connections list in the ActiveMQ broker console and know where the connection came from, but it gets a unique ID so that more than one instance of the app on the same machine will show up as a distinct connection. On Thu, Jun 5, 2014 at 12:02 PM, pwalter patrick.wal...@nasa.gov wrote: Jim, Thanks... What do you use for the connectionID? Will null work? -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-Fails-when-User-Password-Required-tp4681728p4681735.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: REST WSDL/WADL
Hi, I don't think you need a WSDL to make RESTful calls. Here's a good starting point to come up to speed on making REST calls in C#: http://stackoverflow.com/questions/9620278/how-do-i-make-calls-to-a-rest-api-using-c As far as the specific REST API for ActiveMQ, I imagine it's documented somewhere on the ActiveMQ website. A quick search should turn it up. Best, Jim On Tue, Feb 11, 2014 at 2:40 AM, HellKnight hellkni...@foxmail.com wrote: Hi Mr. JGomes: I want to call REST management API in c# code, where can I get the wsdl file? Is using HttpWebRequest/Response class the only way to do it? -- View this message in context: http://activemq.2283324.n4.nabble.com/REST-WSDL-WADL-tp2361712p461.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Apache.NMS.ActiveMQ openwire client performance
Hi Dan, I'm not quite sure where you're having performance issues and what exactly it is that you want to improve. Is the NMS client going too slow producing messages to a Java consumer? If you have a small test case in source code that can show the performance issue, that would be very helpful. Best, Jim On Thu, Nov 14, 2013 at 10:30 AM, dantran dant...@gmail.com wrote: Hi I have a need to transport a large amount messages from .NET into java and ActiveMQ seems to be a good good fit for this bridge. However, I am running into some performance that I need to understand. The flow of the transport, consisting of NMS client to push messages, 1K each, into multiple queues concurrently ( varies from 1 to 500) via openwire TCP as localhost On the java side, i have embedded activemq configured with the following info: - no persistent - each queue memory is configurable - data get pulled out using one thread per queue as fast as it can ( why I not using message listener may not relevant in this scenarios). - messages can be either sent in block using transaction or no transaction. Here are the results of 300 queues, on my 4 CPU (1 socket) - the java side max out at 7K msg/sec - each queue memory usage are slow at jmx side, mean java are able to keep up the incoming ingest - CPU from window task manager show %68 average this include both java and .net process, but the .NET side double the java broker/consumber side is it normal at the NMS client producer side? Huge thanks for any suggestion/advice Thanks -Dan -- View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-ActiveMQ-openwire-client-performance-tp4674488.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: How can I check the existence of a durable subscriber with a given name using NMS?
You can try using the Statistics plug-in. See here for more information: http://activemq.apache.org/statisticsplugin.html See here for some sample NMS code that uses it. http://stackoverflow.com/questions/15746391/how-to-access-the-activemq-statistics-plugin-in-net/15845642#15845642 On Wed, Oct 9, 2013 at 1:23 AM, HellKnight hellkni...@foxmail.com wrote: There are JMX APIs such as getDurableTopicSubscribers and getInactiveTopicSubscribers , so the task looks easy if you are writing java code. However, I am coding in C# and using NMS libraries so I could not find a way that I can use these APIs(if there is a way to do so please let me know ! ). How could I check the existence of a durable subscriber with NMS APIs ? -- View this message in context: http://activemq.2283324.n4.nabble.com/How-can-I-check-the-existence-of-a-durable-subscriber-with-a-given-name-using-NMS-tp4672438.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ NMS, connection will be hung with an invalid URL
Use the following URL option to avoid hanging on startup when using the failover transport. activemq:failover:tcp://activemqhost:61616* ?transport.StartupMaxReconnectAttempts=3* Set the startup max reconnect attempts to whatever number you want. It will eventually stop trying at start up. Once it successfully connects at least once, then it will use normal failover semantics to continually retry connecting in case of a disconnect. On Wed, Jul 31, 2013 at 11:06 AM, Timothy Bish tabish...@gmail.com wrote: On 07/30/2013 11:59 PM, yq8925 wrote: In NMS.ActiveMQ1.5.6 and 1.6.0, if target JMS server URL is invalid or no responsible, the client program will be hung at code ISession session = connection.CreateSession(**AcknowledgementMode.**AutoAcknowledge). The connection.RequestTimeout does not work here... Anyone could help on it? -- View this message in context: http://activemq.2283324.n4.** nabble.com/ActiveMQ-NMS-**connection-will-be-hung-with-** an-invalid-URL-tp4669903.htmlhttp://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-connection-will-be-hung-with-an-invalid-URL-tp4669903.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. Sounds like you are using the failover transport. I'd guess you need to set the timeout option on the failover transport in order to have the send attempt bail if it can't connect after some time. -- Tim Bish Sr Software Engineer | RedHat Inc. tim.b...@redhat.com | www.fusesource.com | www.redhat.com skype: tabish121 | twitter: @tabish121 blog: http://timbish.blogspot.com/
Re: Cleaning up queues...
Add the statistics plugin to the broker, and then create a monitoring program that will watch your queues, and if they go to zero producers, then delete them. Name the queues with a standard prefix, so the monitoring application can select all of them with a wildcard pattern. On Fri, Apr 26, 2013 at 1:06 PM, SledgeHammer gro...@firstam.com wrote: Per a previous thread, it was suggested to me to have each producer create its own queue so that I can implement a round-robin the producers type scheme... so I'm doing something like: _destination = SessionUtil.GetDestination(_session, _strQueueName); _strQueueName is initialized as String.Format(queue://{0}, Guid.NewGuid().ToString()); this part all works fine, I can create and delete the queue and send recv. Problem is if the producer doesn't play nice or crashes, etc. it's going to leave it queue around. Is there a way to have the queue delete itself if the producer doesn't exit clean? I saw a policy that can delete inactive queues, but that requires the queue to be empty. I can not have a lifetime on the messages. I can't use a temp queue either because I need it to show up in the admin page for monitoring purposes. I can have an arbitrary number of producers... I just want to make sure that I don't end up with 1000 dummy queues on the admin page if producers don't exit clean. -- View this message in context: http://activemq.2283324.n4.nabble.com/Cleaning-up-queues-tp4666286.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ with WCF blocking in startup
Did you try lowering the StartupMaxReconnectAttempts to 1? This gives you one try at startup, which sounds like what you are trying to accomplish, right? Don't lower it to 0, because that effectively disables it, and it will immediately go into failover mode at startup and continue to try connecting until it is successful. On Wed, Apr 10, 2013 at 12:29 AM, EveX cale...@orange.fr wrote: It's still blocking at start (or at createSession if I invert those lines) and return a TimeoutException after 1 min in the method calling the WCF. -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-with-WCF-blocking-in-startup-tp4665764p4665799.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: How to delete message in queue?
Hi Colin, (I'm moving this to the Users list, instead of the Dev list) I think using a selector should accomplish what you want. Here's an example. IDestination dest = GetDestination(); // Get the destination interface IMessageConsumer msgConsumer = session.CreateConsumer(dest, MYPROP = 'thevalue'); IMessage msg = msgConsumer.ReceiveNoWait(); if(null != msg) { // Do something with the message. session.Commit(); } else { session.Rollback(); } This will retrieve a message from the queue only if it has the specified property value. You may not even need to use transactions. Hope that helps. Best, Jim On Wed, Apr 10, 2013 at 3:06 AM, colin_lee ney...@nhn.com wrote: Hello all, when i used ActiveMQ, i met a problem, how to delete message according the property what i set? currently, i didn't find method to do it. so i used transaction to do it. i will loop my messages in queue, if property does not equal with what i wanted, i commit that session. so the message will be removed from queue to dequeue. if property does not equal with what i wanted, i will rollback transaction. But when i do this kind of operations for multiple times, message also will be removed from queue whatever i rollback or not. anybody knows what's the reason? do you know how to delete message accordind to the property??? or others -- View this message in context: http://activemq.2283324.n4.nabble.com/How-to-delete-message-in-queue-tp4665801.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://localhost:61616
Hello, Your sample code works. Here's what you need in order to run. 1. The nmsprovider-activemq.config file is not necessary, since you are using the standard assemblies, so you can get rid of this if you want. It's an optional file, and I suggest not using it unless you are doing something advanced. 2. You need to have Apache.NMS.dll, Apache.NMS.ActiveMQ.dll, and Ionic.Zlib.dll in your execution folder. These are required. I suspect that you are missing the Ionic.Zlib.dll. The way I set up my project is that I add a reference to Apache.NMS.dll. I then add the Apache.NMS.ActiveMQ.dll and Ionic.Zlib.dll as content files that are copied to the output folder if they are newer, but I don't reference them directly. Best, Jim On Tue, Apr 9, 2013 at 8:28 AM, JavyRocks javy.ro...@gmail.com wrote: Hi It doesn't work either still get the same error This is the stack trace at Apache.NMS.NMSConnectionFactory.CreateConnectionFactory(Uri uriProvider, Object[] constructorParams) in c:\dev\NMS\src\main\csharp\NMSConnectionFactory.cs:line 123 at Apache.NMS.NMSConnectionFactory..ctor(Uri uriProvider, Object[] constructorParams) in c:\dev\NMS\src\main\csharp\NMSConnectionFactory.cs:line 86 at ConexionActiveMQ.Program.Main(String[] args) in C:\Users\Administrator\documents\visual studio 2010\Projects\ConexionActiveMQ\ConexionActiveMQ\Program.cs:line 54 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) tabish...@gmail.com wrote You need the Apache ActiveMQ NMS Provider. http://activemq.apache.org/nms/apachenmsactivemq-v156.html On 04/08/2013 07:44 PM, JavyRocks wrote: *I still get the No IConnectionFactory implementation found for connection URI: activemq:tcp://localhost:61616 Error. I've paste and include in the compile project the archive nmsprovider-activemq.config I'm Working with .NET 4.0 and the references are Apache.NMS-1.5.1-bin.zip\net-4.0\release The code is very estandar and simple but I can't get throw the connection error* using System; using System.Collections.Generic; using System.Linq; using System.Text; using Apache.NMS; using Apache.NMS.Util; using System.Collections; using System.Reflection; using System.IO; namespace ConexionActiveMQ { class Program { private static string[] GetConfigSearchPaths() { ArrayList pathList = new ArrayList(); // Check the current folder first. pathList.Add(); AppDomain currentDomain = AppDomain.CurrentDomain; // Check the folder the assembly is located in. pathList.Add(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); if (null != currentDomain.BaseDirectory) { pathList.Add(currentDomain.BaseDirectory); } if (null != currentDomain.RelativeSearchPath) { pathList.Add(currentDomain.RelativeSearchPath); } return (string[])pathList.ToArray(typeof(string)); } static void Main(string[] args) { string[] direcciones; direcciones = GetConfigSearchPaths(); // Example connection strings: //activemq:tcp://localhost:61616 //stomp:tcp://activemqhost:61613 //ems:tcp://tibcohost:7222 //msmq://localhost Uri connecturi = new Uri(activemq:tcp://localhost:61616); Console.WriteLine(About to connect to + connecturi); // NOTE: ensure the nmsprovider-activemq.config file exists in the executable folder. IConnectionFactory factory = new NMSConnectionFactory(connecturi); using (IConnection connection = factory.CreateConnection()) using (ISession session = connection.CreateSession()) { // Examples for getting a destination: // // Hard coded destinations: //IDestination destination = session.GetQueue(FOO.BAR); //Debug.Assert(destination is
Re: ActiveMQ with WCF blocking in startup
Hello, The parameters are case sensitive. Try using the following URI: activemq:failover:(tcp://activemqhost:61616)?transport.StartupMaxReconnectAttempts=3 Best, Jim On Tue, Apr 9, 2013 at 6:27 AM, EveX cale...@orange.fr wrote: Hi. We're using ActiveMQ with .NET and WCF. When we call the service to start the connection, the application block in Here's our URI in the test: We also tried Even adding timeout parameter, the service is blocking if the ActiveMQ server is not launched. What we want is to write logs in database if the connection cannot start. Here's the start method: At the end, the catch is never reached, we have a WCF TimeoutException instead. We really don't know how to solve it. Regards. PS: Sorry for my english -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-with-WCF-blocking-in-startup-tp4665764.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://localhost:61616
Here is the list of files that I have in my output folder: Apache.NMS.ActiveMQ.dll Apache.NMS.dll Ionic.Zlib.dll NMSFactoryTest.exe (This is the name of project I created using your sample code.) NMSFactoryTest.exe.config (This only has a declaration to use .NET 4.0 runtime.) That's all that's needed to run, but they all must be in the same folder together. On Tue, Apr 9, 2013 at 10:56 AM, JavyRocks javy.ro...@gmail.com wrote: Hellow a lot thanks for the attetion and Help so far But It doesn't work summering up I'm Developing for .Net 4.0 I have the ActiveMQ Broker version 5.8 running I've downloaded the latest version Apache.NMS.ActiveMQ-1.5.6-bin.zip but this one doesn't come with the whole DLLs Just come with Apache.NMS and Apache.NMS.Test So I changed to work with the Apache.NMS.ActiveMQ-1.5.5-bin.zip from this Link http://activemq.apache.org/nms/apachenmsactivemq-v155.html this one in particular has for the FrameWork 4.0 the folowing DLLs Lib Ionic.Zlib.dll Apache.NMS.dll Apache.NMS.Test.dll nunit.framework.dll Build Apache.NMS.ActiveMQ.dll Apache.NMS.ActiveMQ.Test.dll Also I've included in my proyect the file nmsprovider-activemq.config Changed the property to copy always (To be included in the output) Still get the error in the line IConnectionFactory factory = new NMSConnectionFactory(connecturi); I've tried all the sugestions, According to JGomes I put those DLLs in the project and change the property to copy if Newer Got the error Changed to reference directly and also the error If U like I'd give remote access I kind of desperated -- View this message in context: http://activemq.2283324.n4.nabble.com/No-IConnectionFactory-implementation-found-for-connection-URI-activemq-tcp-localhost-61616-tp4665743p4665777.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: No IConnectionFactory implementation found for connection URI: activemq:tcp://localhost:61616
If you are compiling with .NET 4.0, you can't use the Client Profile. You'll need to use the full version of .NET 4.0. I check out the source and build the whole library myself, and everything seems to work for me. The NMSConnectionFactory.cs is part of the main Apache.NMS project, not the Apache.NMS.ActiveMQ project. On Tue, Apr 9, 2013 at 1:33 PM, JavyRocks javy.ro...@gmail.com wrote: Hi I Finally make it Work But I have to changed it to Framework 3.5 and Using the Apache.NMS-1.4.0-bin.zip The references was Apache.NMS Apache.NMS.ActiveMQ In my humble opinion theres something wrong with the 1.5 release I would put my whole code in VB.NET as soon as I finished it'd be my contribution -- View this message in context: http://activemq.2283324.n4.nabble.com/No-IConnectionFactory-implementation-found-for-connection-URI-activemq-tcp-localhost-61616-tp4665743p4665787.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Apache.NMS.WCF developers?
A JIRA ticket might be a good way of handing it off. If it's a unit test, that would be an excellent start to adding some unit tests to the WCF provider. On Thu, Feb 28, 2013 at 6:29 AM, stynor sty...@gmail.com wrote: Thanks! Yes, I'll send a test case - I'll need to clean up the code since the driver program I'm using is a bastardized adaptation of a unit test we used on a previous project with a different JMS implementation. Where should I post the code? Should I open up a JIRA ticket and attach there? -- View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4664260.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Apache.NMS.WCF developers?
Full disclosure on my side - I am a .NET developer, but I haven't used the WCF bindings. :-) From the message text in the exception being thrown, my first guess is that there is some kind of configuration setting that is missing. It reads like it is trying to enforce/protect the WCF communication model. On Wed, Feb 27, 2013 at 1:29 PM, stynor sty...@gmail.com wrote: Well... Where do I start :) Full disclosure: I'm a java developer trying to add support for our .NET developers. I know just enough .NET to get myself into serious trouble. The NMS.WCF source does not have any example or test projects - and no documentation that I've been able to find. The stackoverflow article I linked to does have an App.config excerpt that I've been able to adapt to get some semi-working code. I've built the NMS libs from source and have used them to create a simple one-way fire and forget message onto a queue via the WCF library. So far so good. When it comes to creating a service to listen to that queue and does something with it, however, I get runtime exceptions. At this point in NmsInputChannelListener.cs: NmsInputChannel newChannel; bool channelCreated = CreateOrRetrieveChannel(out newChannel); Tracer.Debug(Dispatching incoming message); newChannel.Dispatch(message); I get an exception complaining that the channel is in Created state and needs to be in Open state. I've stepped through the CreateOrRetrieveChannel() function and indeed - it creates a new channel, but does not open it. Might I be missing something in my App.config? Is there a test project I've not discovered that tests this code -- (i.e can I confirm that the WCF library itself still works and that it is my client code that is at fault?) Once I get past these very basics, I will probably be able to articulate more specific Request Reply questions. DEBUG: Dispatching incoming message ERROR: Error dispatching Message: System.InvalidOperationException: The communication object, Apache.NMS.WCF.NmsInputChannel, is in the Created state. Communication objects cannot be used for communication unless they are in the Opened state. at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen() at Apache.NMS.WCF.NmsInputQueueChannelBase`1.Dispatch(T request) in C:\dev\apache\Apache.NMS.WCF\src\main\csharp\NmsInputQueueChannelBase.cs:line 79 at Apache.NMS.WCF.NmsInputChannelListener.Dispatch(Message message) in C:\dev\apache\Apache.NMS.WCF\src\main\csharp\NmsInputChannelListener.cs:line 354 jgomes wrote Hi Steve, I read the reply from marc_s on that Stack Overflow link you provided. What is missing from his answer that you are needing? It seems like he covered the solution necessary for implementing request reply, or am I missing something different in your requirements? Best, Jim -- View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4664222.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Apache.NMS.WCF developers?
Thanks for the config. I'll take that and set it to my environment. Would you mind sharing your sample code that you have so far to send the initial message? On Wed, Feb 27, 2013 at 3:13 PM, stynor sty...@gmail.com wrote: Its either that, or bitrot has set in and the code - which appears to be almost 5 years old now. Perhaps it simply no longer works with modern versions of .NET? Since I can't find any documentation, or examples or unit tests I really don't know where to start. I scraped together a working fire-and-forget client by using the config example from that stackoverflow code and massaging it a bit. However that leaves me with a way to send messages but not receive them. jgomes wrote Full disclosure on my side - I am a .NET developer, but I haven't used the WCF bindings. :-) From the message text in the exception being thrown, my first guess is that there is some kind of configuration setting that is missing. It reads like it is trying to enforce/protect the WCF communication model. FWIW, my current app.config: ?xml version=1.0? configuration startup supportedRuntime version=v4.0 sku=.NETFramework,Version=v4.0/ /startup system.serviceModel extensions bindingExtensions add name=nmsBinding type=Apache.NMS.WCF.NmsBindingCollection, Apache.NMS.WCF, Version=1.6.0.2979, Culture=neutral, PublicKeyToken=82756feee3957618 / /bindingExtensions /extensions bindings nmsBinding binding name=NMS.queue.test1 destination=queue.test1 destinationType=Queue /binding /nmsBinding /bindings client endpoint address=tcp://10.28.21.101:61616 binding=nmsBinding bindingConfiguration=NMS.queue.test1 contract=FFServiceReference.FireAndForgetTestPortType name=AccessHostedService /endpoint /client services service name=test_ff_dotnet.Receiver endpoint address=tcp://10.28.21.101:61616 binding=nmsBinding bindingConfiguration=NMS.queue.test1 contract=FFServiceReference.FireAndForgetTestPortType name=AccessHostedService /endpoint /service /services /system.serviceModel /configuration -- View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174p4664228.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Apache.NMS.WCF developers?
Hi Steve, I read the reply from marc_s on that Stack Overflow link you provided. What is missing from his answer that you are needing? It seems like he covered the solution necessary for implementing request reply, or am I missing something different in your requirements? Best, Jim On Tue, Feb 26, 2013 at 3:27 PM, stynor sty...@gmail.com wrote: All - I have a need to use the NMS WCF library in a current project, but need support for Request Reply. As far as I can tell, the current library does not support Request Reply ( http://stackoverflow.com/questions/2053631/duplex-or-request-reply-with-apache-activemq-wcf-binding-configuration-question ). I'm trying to understand how best to add this support. Are any of the original WCF devs are still on the mailing list? Or if someone else has enough WCF chops to help get me oriented. Better yet, my company is willing to pay to get this done (and of course we will contribute the resulting code back to the project). Any takers? Thanks, Steve stynor at gmail dot com -- View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-WCF-developers-tp4664174.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ NMS API Location
Hi pwalter Thanks for your inquiry. I have not had a opportunity to solve this problem yet. If you are in immediate need of reference documentation, it is possible to generate them from the source code yourself. It appears that the files were moved or deleted from the server. If they were deleted, it may take quite a while to regenerate all of the old versions, and I doubt I would put my time into doing all the old versions. Best, Jim On Feb 24, 2013 2:05 PM, pwalter patrick.wal...@nasa.gov wrote: ANY IDEA WHY THE NMS LINKS ARE STILL NOT AVAILABLE?? -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-API-Location-tp4663581p4663989.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ NMS API Location
Excellent. Thanks, Tim. I'll follow up with Hiram to see if we can get this squared away. On Feb 24, 2013 3:32 PM, Timothy Bish tabish...@gmail.com wrote: On 02/24/2013 05:56 PM, Jim Gomes wrote: Hi pwalter Thanks for your inquiry. I have not had a opportunity to solve this problem yet. If you are in immediate need of reference documentation, it is possible to generate them from the source code yourself. It appears that the files were moved or deleted from the server. If they were deleted, it may take quite a while to regenerate all of the old versions, and I doubt I would put my time into doing all the old versions. Best, Jim On Feb 24, 2013 2:05 PM, pwalter patrick.wal...@nasa.gov wrote: It looks like the content isn't lost, at least I think its all there in svn now: https://svn.apache.org/repos/**asf/activemq/site/nms/ndochttps://svn.apache.org/repos/asf/activemq/site/nms/ndoc I'd guess that when Hiram migrated the site to svn pub style that something didn't quite go right in the NMS part of the site publishing. Maybe bug Hiram and see if its an easy fix. ANY IDEA WHY THE NMS LINKS ARE STILL NOT AVAILABLE?? -- View this message in context: http://activemq.2283324.n4.**nabble.com/ActiveMQ-NMS-API-** Location-tp4663581p4663989.**htmlhttp://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-API-Location-tp4663581p4663989.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- Tim Bish Sr Software Engineer | RedHat Inc. tim.b...@redhat.com | www.fusesource.com | www.redhat.com skype: tabish121 | twitter: @tabish121 blog: http://timbish.blogspot.com/
Re: ActiveMQ NMS API Location
Tim, I just had a chance to look at the repository link you included, and it appears that all of the old API versions are indeed gone. I doubt there will be much chance of recreating them. On Sun, Feb 24, 2013 at 4:05 PM, Jim Gomes e.se...@gmail.com wrote: Excellent. Thanks, Tim. I'll follow up with Hiram to see if we can get this squared away. On Feb 24, 2013 3:32 PM, Timothy Bish tabish...@gmail.com wrote: On 02/24/2013 05:56 PM, Jim Gomes wrote: Hi pwalter Thanks for your inquiry. I have not had a opportunity to solve this problem yet. If you are in immediate need of reference documentation, it is possible to generate them from the source code yourself. It appears that the files were moved or deleted from the server. If they were deleted, it may take quite a while to regenerate all of the old versions, and I doubt I would put my time into doing all the old versions. Best, Jim On Feb 24, 2013 2:05 PM, pwalter patrick.wal...@nasa.gov wrote: It looks like the content isn't lost, at least I think its all there in svn now: https://svn.apache.org/repos/**asf/activemq/site/nms/ndochttps://svn.apache.org/repos/asf/activemq/site/nms/ndoc I'd guess that when Hiram migrated the site to svn pub style that something didn't quite go right in the NMS part of the site publishing. Maybe bug Hiram and see if its an easy fix. ANY IDEA WHY THE NMS LINKS ARE STILL NOT AVAILABLE?? -- View this message in context: http://activemq.2283324.n4.**nabble.com/ActiveMQ-NMS-API-** Location-tp4663581p4663989.**htmlhttp://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-API-Location-tp4663581p4663989.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- Tim Bish Sr Software Engineer | RedHat Inc. tim.b...@redhat.com | www.fusesource.com | www.redhat.com skype: tabish121 | twitter: @tabish121 blog: http://timbish.blogspot.com/
Re: ActiveMQ NMS API Location
It looks like the files were deleted from the server, or moved into a different folder. I'm not sure what happened to them, but thanks for the heads up. I'll try and look into this to see if we can bring them back online. On Sat, Feb 16, 2013 at 9:32 AM, pwalter patrick.wal...@nasa.gov wrote: The links to the NMS api are broken... Could someone provide a valid link?? thanks -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-NMS-API-Location-tp4663581.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMS : Access MSMQ queues by format name instead of path name?
Hi andredtrsa, The MSMQ provider hasn't been updated in a while, and may be missing some features. However, what you are looking to do should be possible. The structure of NMS is set up to pass through destination names to the provider so they can handle them correctly. It's possible that the MSMQ implementation doesn't support using format names currently, but it could be enhanced to do so. Some examples and test cases would be helpful. Also, any code patch submissions are always welcome. Best, Jim On Mon, Feb 4, 2013 at 4:53 AM, andredtrsa andre.du.toit@gmail.comwrote: Hi I am using NMS (latest source from Subversion) to provide me with a single API for delivering messages to JMS and MSMQ queues. The MSMQ queues are all accessed through Active Directory Server using public format names (PUBLIC=someGuid and no host to connect to). Due to constraints outside of my control, I am not allowed to use path names (host + queue name) to access the MSMQ queues. Judging from the JMS-centric interface of NMS (as expected) and looking at Apache.NMS.MSMQ specifically, it would appear to be impossible to access MSMQ queues from NMS using format names instead of path names. Using the basic NMS example test to connect to MSMQ confirms this. Am I missing something obvious here (NMS.MSMQ docs are non-existent) or should I rather stick with standard .NET APIs for accessing MSMQ queues by format name? -- View this message in context: http://activemq.2283324.n4.nabble.com/NMS-Access-MSMQ-queues-by-format-name-instead-of-path-name-tp4662708.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: C# NMS 1.5.6 client occurs handles leak problem when trying to reconnect using failover
Hi Lori, I don't have a solution for you, but could you provide a small test app (or better yet, a unit test) that can be used to reproduce the problem? Any kind of resource or memory leaks are top priority. Thanks, Jim On Tue, Dec 25, 2012 at 12:37 AM, Lori knight802...@yahoo.com.cn wrote: Hi! One AMQ producer thread of My NMS v1.5.6 Client tried to send messages to AMQ Server using the uri failover:(tcp://serverip:61616). To test the handle leak problem, I disconnect the network and open the windows server 2003 task manager to check the handles num change of the process when producer is sending the messages. I find that the NMS Client process's handle num keeps increasing during failover's reconnection time.Once the connection is reestablished, the handles which are opened at reconnection times will not be cleaned up until the exit of the NMS Client process. How can I solve this problem? -- View this message in context: http://activemq.2283324.n4.nabble.com/C-NMS-1-5-6-client-occurs-handles-leak-problem-when-trying-to-reconnect-using-failover-tp4661062.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Can Failover transport retry current connection first?
Hi Rolin, Just an idea, but what about listing the first broker twice in the failover list? failover:(tcp://broker1:61616,*tcp://broker1:61616*,tcp://broker2:61616)?... On Thu, Nov 22, 2012 at 11:47 AM, rolin ro...@wellington.com wrote: Hi, I am running activemq 5.4.2 with JDK1.6.025 in Linux. There are two brokers configured via network of brokers. Java client connects to brokers using the following failover url: failover:(tcp://broker1:61616,tcp://broker2:61616)?randomize=falseinitialReconnectDelay=15000maxReconnectAttempts=10 Java client sometimes falsely detects connection lost to broker1 and successfully reconnects to broker2. Is there a way to configure failover transport to retry broker1 first before trying broker2? I understand that Priority Backup is introduced as part of 5.6.0 and that might serve the purpose. But I am using 5.4.2 and do not plan to upgrade in near future. The cause of false detection of connection lost is under investigation. It could be caused by long GC (30 seconds). But it is a separate issue. -- View this message in context: http://activemq.2283324.n4.nabble.com/Can-Failover-transport-retry-current-connection-first-tp4659680.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Apache NMS Stomp - NuGet Package
Hi Dean, I can't speak to the usage of logos. The legal department would probably need to be involved in that type of decision, as well as other higher-ups. Do you have a link to the information on the requirements? It's at least worth looking in to so we can make a fully informed decision as to whether we should do this. Thanks, Jim On Sat, Nov 24, 2012 at 5:45 PM, dean.ward dean.w...@bakedbean.org.ukwrote: Hi Jim, There's a form to fill in on codebetter.com which would allow create of automated builds for all the NMS projects to be performed whenever a tag is created in /tags for each project. Upon a successful build we can publish directly to NuGet. The only requirement of that website is the placement of logos on http://activemq.apache.org/nms/index.html. Is that something you guys are happy to do? Let me know and I'll do all the configuration along with some docs. Cheers, Dean -- View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-Stomp-NuGet-Package-tp4659722p4659734.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Apollo Openwire, Apache.NMS.ActiveMQ and Failover Transport
Hi Dean, I haven't attempted connecting to Apollo via OpenWire yet, but I wouldn't think that using failover would have any bearing on it. Failover for NMS is entirely a client-side implementation, and is not dependent upon the server to do anything. If you can connect without failover in the first place, then you should be able to use failover. Best, Jim On Sat, Nov 24, 2012 at 5:22 AM, dean.ward dean.w...@bakedbean.org.ukwrote: Hi all, I'm attempting to use Apache.NMS.ActiveMQ with Apollo 1.5's Openwire protocol support. Does anybody know if the failover transport is supported? I'm using this simple connectionstring... failover:(tcp://localhost:61613) And I get the following error... ConnectionError: Unspported command: class org.apache.activemq.apollo.openwire.command.ConnectionControl : Any pointers would be greatly appreciated! Thanks, Dean -- View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-Openwire-Apache-NMS-ActiveMQ-and-Failover-Transport-tp4659721.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Apache NMS Stomp - NuGet Package
Hi Dean, This would be a great way to extend the exposure of NMS. Any suggestions on how to automate this would be appreciated. Best, Jim On Sat, Nov 24, 2012 at 5:25 AM, dean.ward dean.w...@bakedbean.org.ukwrote: Hi all, Any plans to make the NMS STOMP binary a NuGet package? Apache.NMS.ActiveMQ and Apache.NMS both appear in NuGet although I suspect they're not managed by the development team? Would be great if new builds could be automatically pushed up there... Cheers, Dean -- View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-Stomp-NuGet-Package-tp4659722.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Apache NMS Stomp - NuGet Package
Hi Dean, Please have a look. The most important aspect to this is that it be non-instrusive, meaning that once set up, it needs to be automatic and pretty-much maintenance free. I looked at the codebetter website, and I can't quite make heads or tails of it. I'm not sure how that plays in to connecting things to NuGet. Maybe it'll become clearer once you've had a chance to explore things a bit more. Best, Jim On Sat, Nov 24, 2012 at 3:22 PM, dean.ward dean.w...@bakedbean.org.ukwrote: Hi Jim, I've seen a fair bit of success with projects using the codebetter.com TeamCity instance coupled with pushing directly to NuGet whenever a build completes successfully there. I can take a look at getting something setup if you'd like? Cheers, Dean -- View this message in context: http://activemq.2283324.n4.nabble.com/Apache-NMS-Stomp-NuGet-Package-tp4659722p4659732.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Unable to use ActiveMQ.NMS on Windows 7
Use the full .NET framework in your project, not the Client Profile. Right-click on your Project in *Solution Explorer*, and select Properties. On the *Application* tab, set the *Target framework* to *.NET Framework 4*. On Mon, Oct 15, 2012 at 5:44 PM, songu songu...@gmail.com wrote: Hi Guys, I have an issue with ActiveMQ.NMS as well. I added both Apache.NMS.ActiveMQ and Apache.NMS into my .Net C# solution. But they can not be resolved due to have a dependency on System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, which is not the current target framework .NetFramework, Version=v4.0, Profile=Client. My PC has .Net 4.0 installed and OS is WIN 7. Any suggestion what is the problem? Thanks! -- View this message in context: http://activemq.2283324.n4.nabble.com/Unable-to-use-ActiveMQ-NMS-on-Windows-7-tp465p4657827.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ApacheNMS: How to Open a closed connection?
Hi Philip, What version of Apache.NMS and Apache.NMS.ActiveMQ do you have? What version of the broker are you connecting to? Might be helpful to turn on the debug NMS logging. The client id is arbitrary, and can be anything you want. My personal convention is to use a combination of the host name, app name, and a guid. On Sep 27, 2012 8:57 PM, philipyao phi...@web2printexperts.com wrote: Hi Jim! Still does not work for me. Connection is already closed. exception keeps popping up. :( By the way, I don't have a ClientID for the activeMQ that I am connecting to. Where can I generate one or should I request for one from my client(they host the ActiveMQ server). Thanks, Philip -- View this message in context: http://activemq.2283324.n4.nabble.com/ApacheNMS-How-to-Open-a-closed-connection-tp4657075p4657134.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ApacheNMS: How to Open a closed connection?
Hi Philip, I would recommend using the higher-level NMSConnectionFactory API as follows: IConnectionFactory connectionFactory = new NMSConnectionFactory(activemq:failover:tcp://activemqhost:61616, your-connectionid-here); IConnection connection = connectionFactory.CreateConnection(userName, password); connection.Start(); Hope that helps. Best, Jim On Thu, Sep 27, 2012 at 1:04 AM, philipyao phi...@web2printexperts.comwrote: Hi guys! I am new to activeMq and I have some problems when starting a connection after being created. It always throws a ConnectionClosedException which says something like Connection is already closed. I have read attempting to create a connection through a while loop worked for them but it's has not on my end. :( Other attempts, I've tried to - attach failover: text on the url. - Using with and without user credentials on creating the Connection object. Below is my code: bool connected = false; Connection conn = (Connection)this.ActiveMqConnectionFactory.CreateConnection( username, password); int times = 0; while (!connected) { Console.WriteLine(Trying + times.ToString()); try { times++; conn.Start(); connected = conn.IsStarted; } catch { conn.Dispose(); conn = (Connection)this.ActiveMqConnectionFactory.CreateConnection( username, password); } } My question now is there a way to open a connection through code? By the way, I dont have a clientId when creating an instance of the Connection Factory, I only use the one with only the url as the parameter. So basically, I am assuming that I am connecting through the defaultClientId. Also, does the clientId really matter when starting connections? Any help would be greatly appreciated! Thanks! Philip -- View this message in context: http://activemq.2283324.n4.nabble.com/ApacheNMS-How-to-Open-a-closed-connection-tp4657075.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: C# Consumers Disconnecting
Yes, it does reconnect to the same broker. I recommend using it to ensure reliability against network outages. I also noticed that you are running against an ActiveMQ 5.6 SNAPSHOT. Is there a reason you haven't upgraded to the shipping version? If the problem is due to a problem on the server side, someone else may not be able to replicate it. Also it shouldn't be necessary to call Acknowledge() in the message handler if you have AutoAcknowledge set. On Tue, Aug 28, 2012 at 7:58 AM, TrainTime zzuza...@gmail.com wrote: I was not using the failover protocol, though I just tried it and it did not appear to fix anything. I don't think it really applies in my situation because there's only one broker, not many. Unless if there's just one broker does it just try to reconnect to the one over and over? As for pattern, I haven't really noticed one, which has made this all the more frustrating. The only thing that seems to be constant, is we have a gap in data (ie. |--data|..[data---]). The gap in my testing file is probably about a minute, maybe 2 at most, and it usually disconnects at some random time in that duration. But I've also seen it successfully stay connected the whole time. I'm trying to enableStatusMonitoring on the transport connector now and hopefully get some more useful information. -- View this message in context: http://activemq.2283324.n4.nabble.com/C-Consumers-Disconnecting-tp4655632p4655721.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: C# Consumers Disconnecting
One thing you didn't mention that could be helpful is whether you are using the failover protocol. I would think that any network interruption would be handled by the failover layer and automatically reconnect the consumer. Other than that, have you noticed any pattern to the connection, such as it disconnects after the same duration, or after the same number of messages consumed, etc. On Mon, Aug 27, 2012 at 12:48 PM, TrainTime zzuza...@gmail.com wrote: I've been trying to figure out this problem I've been having with apache NMS for at least a week now, so I decided maybe I would try to post here and see if anyone has experienced similar issues. In my situation, we have about 5-7 producers all producing to one topic, and then we have one consumer consuming data from the same topic. However, this singular consumer will suddenly disconnect from the broker with no indication to me (that i've been able to find) and stop receiving anything, the only way to tell is by checking the broker and seeing that the topic has no consumers. I have been searching around these forums for a solution and here's a few things I tried that didn't seem to make any difference: 1. Set ?wireFormat.maxInactivityDuration=0 on my openWire transport connector 2. Set my IConnection and ISession to be auto acknowledge 3. Changed the memory limit of topics to 100mb from 1 mb 4. Call IMessage.Acknowledge after receiving a message 5. Changed IConnection and ISession to be persistent object along with the consumer I'm not sure what else at this point I have to try. I'm using activeMQ 5.6 SNAPSHOT which runs as a service, Apache.NMS 1.5.1.2739, and Apache.NMS.ActiveMQ 1.5.6.2746. Also one last thing, here's how I'm creating my consumer in the C# code: //setup jms IConnectionFactory factory = new ConnectionFactory(_connectURI); _connection = factory.CreateConnection(); _connection.AcknowledgementMode = AcknowledgementMode.AutoAcknowledge; _connection.ConnectionInterruptedListener += ConnectionLost; _connection.Start(); _session = _connection.CreateSession(AcknowledgementMode.AutoAcknowledge); _consumer = _session.CreateConsumer(new Apache.NMS.ActiveMQ.Commands.ActiveMQTopic(_topicName)); _consumer.Listener += ProcessItem; _status.Status = ConnectorStatus.Running; _status.Details = JMS Connector is running; And here's what the consumer listener function looks like: public void ProcessItem(IMessage message) { message.Acknowledge(); /* code */ } I also tried looking at Apache logging a bit, but it didn't seem to output anything useful. I think I need to change what its logging, is ERROR the correct syntax for the sl4j logging properties file? Thanks in advance for any help anyone can offer, this has been driving me nuts -- View this message in context: http://activemq.2283324.n4.nabble.com/C-Consumers-Disconnecting-tp4655632.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Optimised acknowledgement in NMS
Optimized acknowledge appears to be a consumer setting, not a connection setting. You should be able to configure a consumer using URL parameters. For example, set your consumer destination to the following: topic://mydestination*?consumer.OptimizedAcknowledge=true* The parameter is is bold. On Fri, Jun 15, 2012 at 3:50 PM, newtonsri newton...@yahoo.com wrote: Hi, I am experimenting with NMS. I want to set the acknowledgement mode to optimised acknowledgement. When I refered to material I found that we can do so by using the ActiveMQConnectionFactory instance. Unfortunately ActiveMQConnectionFactory is not available in C#. Can someone throw light on how to set optimised acknowledgement in C# - NMS. Thanks in advance ! -- View this message in context: http://activemq.2283324.n4.nabble.com/Optimised-acknowledgement-in-NMS-tp4653335.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: 64-bit NMS build
There's nothing inherently 32-bt about NMS. It should be compiled for Any CPU, which means it runs as 64-bit on a 64-bit system. I routinely run native 64-bit applications, but then I build from source. I'm pretty sure the courtesy binary DLL distribution should be compiled for Any CPU. On Tue, May 22, 2012 at 2:25 PM, Mark Webb elihusma...@gmail.com wrote: Is there a 64-bit release of ActiveMQ NMS? I have not found one and have had problems building from source.
Re: Configuration file for NMS
If you are using the latest version of NMS, this file is no longer required. It is purely optional. I think the problem is that the Apache.NMS.ActiveMQ.dll is missing from your folder. When you specify the 'activemq:' provider in the connection URL, it will look for this assembly in the same folder as the Apache.NMS.dll assembly. Hope that helps, Jim On Wed, Apr 4, 2012 at 4:48 AM, newtonsri newton...@yahoo.com wrote: Hi, I am new to NMS and so this question might sound very silly. When I tried to run a sample producer/consumer code I got an exception saying IConnectionFactory implementation not found. It is mentioned in the code that I need to have nmsprovider-activemq.config file in the executable path. Can you please tell me where I can get this config file from? Also please let me know if the exception is due to the missing config file or is there someother reason for which I am getting this exception. Thanks in advance. -- View this message in context: http://activemq.2283324.n4.nabble.com/Configuration-file-for-NMS-tp4531614p4531614.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMSReplyTo and JMSReplyTo
A bit of a heads-up, when using a a Request/Reply pattern, *don't* use temp queues. Temp queues (and temp topics) are severely broken in the ActiveMQ 5.4.x and 5.5.x versions. They will only work for a short time before the broker uses up whatever resources, and then it will kick your client off and even the failover protocol won't save you. The best solution, even in the absence of this bug, is to use a designated topic for the reply message and to use the NMSCorrelationId to filter out replies destined for a particular client. It's faster, and it provides complete message round-trip transparency. Refer here to track the status of this problem: https://issues.apache.org/jira/browse/AMQNET-371 On Wed, Mar 7, 2012 at 5:31 AM, Timothy Bish tabish...@gmail.com wrote: On Wed, 2012-03-07 at 14:26 +0100, Knut Aksnes-NOR wrote: Will a JMSReplyTo property created by a Java sender be made available and be usable as a NMSReplyTo attribute by a .NET client using NMS with the ActiveMQ provider? We need to use the Request Reply EIP pattern from Camel against a component we intend to write in .NET (Mostly due to the availability of existing libraries) For this to work more or less automatically we need JMSReplyTo to work, if it does so depends on serialization details for this attribute, this should be a quite easy question to answer for a protocol guru. I could dig into the code myself, but as the answer to the question should be made available as part of the NMS documentation and as a negative answer might trigger a change request I would prefer if some with good protocol knowledge could give an answer. Yes, the destination will be filled in correctly when using .NET and Java clients for ActiveMQ. -- Tim Bish Sr Software Engineer | FuseSource Corp tim.b...@fusesource.com | www.fusesource.com skype: tabish121 | twitter: @tabish121 blog: http://timbish.blogspot.com/
Re: Wire format negotiation timeout: peer did not send his wire format.
Try removing the ?wireFormat.maxInactivityDuration=0 parameter from your connection URI. On Sun, Sep 4, 2011 at 8:53 PM, zcduthie zcdut...@hotmail.com wrote: I've been searching for a solution to this problem for a while, however I could not find something that actually worked anywhere on these forums. Basically the error I'm getting is: 2011-09-05 13:15:08,114 | INFO | Transport failed: java.io.IOException: Wire format negotiation timeout: peer did not send his wire format. | org.apache.activemq.broker.TransportConnection.Transport | Async Exception Handler It seems to work fine for a while, then after 10 minutes or so (approximately 100 records) I receive lots of those error messages. I've made 1 queue, with a single consumer and multiple senders. Both are implemented in c# .NET using the Apache.NMS.ActiveMQ namespace. All connect to the queue using: tcp://localhost:61616?wireFormat.maxInactivityDuration=0 I was thinking it could have been memory issues, because I was receiving the following message from the c# client when trying to send new messages: Could not connect to broker URL: tcp://localhost:61616/?wireformat.maxinactivityduration=0. Reason: Exception of type 'System.OutOfMemoryException' was thrown. at Apache.NMS.ActiveMQ.ConnectionFactory.CreateActiveMQConnection(String userName, String password) at Apache.NMS.ActiveMQ.ConnectionFactory.CreateActiveMQConnection() I was also receiving this sometimes too: Channel was inactive for too long: tcp://localhost:61616/?wireformat.maxinactivityduration=0 at Apache.NMS.ActiveMQ.Connection.SyncRequest(Command command) at Apache.NMS.ActiveMQ.Connection.CheckConnected() at Apache.NMS.ActiveMQ.Connection.Start() However, I've increased the settings in the apache.xml file (see below) and I also tried using the maxinactivityduration setting... Any help would be greatly appreciated!! The relevant log entries (I think?): 2011-09-05 13:01:33,429 | INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@e49d67c: startup date [Mon Sep 05 13:01:33 EST 2011]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main 2011-09-05 13:01:34,390 | WARN | destroyApplicationContextOnStop parameter is deprecated, please use shutdown hooks instead | org.apache.activemq.xbean.XBeanBrokerService | main 2011-09-05 13:01:34,394 | INFO | PListStore:C:\Program Files (x86)\apache-activemq-5.5.0\bin\..\data\localhost\tmp_storage started | org.apache.activemq.store.kahadb.plist.PListStore | main 2011-09-05 13:01:34,424 | INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[C:\Program Files (x86)\apache-activemq-5.5.0\bin\..\data\kahadb] | org.apache.activemq.broker.BrokerService | main 2011-09-05 13:01:34,825 | INFO | KahaDB is version 3 | org.apache.activemq.store.kahadb.MessageDatabase | main 2011-09-05 13:01:34,872 | INFO | Recovering from the journal ... | org.apache.activemq.store.kahadb.MessageDatabase | main 2011-09-05 13:01:34,873 | INFO | Recovery replayed 1 operations from the journal in 0.034 seconds. | org.apache.activemq.store.kahadb.MessageDatabase | main 2011-09-05 13:01:34,883 | INFO | ActiveMQ 5.5.0 JMS Message Broker (localhost) is starting | org.apache.activemq.broker.BrokerService | main 2011-09-05 13:01:34,883 | INFO | For help or more information please see: http://activemq.apache.org/ | org.apache.activemq.broker.BrokerService | main 2011-09-05 13:01:35,160 | INFO | Listening for connections at: tcp://LEOPARDWOOD:61616 | org.apache.activemq.transport.TransportServerThreadSupport | main 2011-09-05 13:01:35,161 | INFO | Connector openwire Started | org.apache.activemq.broker.TransportConnector | main 2011-09-05 13:01:35,164 | INFO | ActiveMQ JMS Message Broker (localhost, ID:LEOPARDWOOD-65119-1315191694916-0:1) started | org.apache.activemq.broker.BrokerService | main 2011-09-05 13:01:35,211 | INFO | jetty-7.1.6.v20100715 | org.eclipse.jetty.util.log | main 2011-09-05 13:01:35,398 | INFO | ActiveMQ WebConsole initialized. | org.apache.activemq.web.WebConsoleStarter | main 2011-09-05 13:01:35,479 | INFO | Initializing Spring FrameworkServlet 'dispatcher' | /admin | main 2011-09-05 13:01:35,588 | INFO | ActiveMQ Console at http://0.0.0.0:8161/admin | org.eclipse.jetty.util.log | main 2011-09-05 13:01:35,765 | INFO | Initializing Spring root WebApplicationContext | /camel | main 2011-09-05 13:01:35,952 | INFO | OSGi environment not detected. | org.apache.camel.spring.handler.CamelNamespaceHandler | main 2011-09-05 13:01:36,785 | INFO | Apache Camel 2.7.0 (CamelContext: camel) is starting | org.apache.camel.spring.SpringCamelContext | main 2011-09-05 13:01:36,785 | INFO | JMX enabled. Using ManagedManagementStrategy. | org.apache.camel.spring.SpringCamelContext | main 2011-09-05 13:01:37,370 | INFO | Found 5 packages with 16 @Converter classes to load |
Re: NMS ActiveMQ provider infinite loop on disposal?
I haven't seen that particular problem. I also have some Windows services that connect to AMQ, but they shut down without hanging. Can you try running with the latest trunk version to see if you can reproduce this problem? It might also be interesting too see a sample of your connection URI. Feel free to modify any sensitive info in your URI string, as long as all of the options are represented. It might also be interesting to try to reproduce with a small sample that connects and then shuts down. There might be a shutdown ordering bug somewhere. On Tue, Nov 23, 2010 at 12:43 PM, magellings mark.gelli...@qg.com wrote: I have a windows service using the Apache NMS ActiveMQ 1.4.1 provider and when trying to stop the service it appears to have gotten in an infinite loop. When the service stops, the session and connection are disposed. Any ideas why the EndianBinaryReader would be doing this? 2010-11-23 14:33:53,987 [218192] [ERROR] Apache.NMS.Tracer - RECEIVED Exception: System.IO.EndOfStreamException: Unable to read beyond the end of the stream. at System.IO.BinaryReader.FillBuffer(Int32 numBytes) at System.IO.BinaryReader.ReadInt32() at Apache.NMS.Util.EndianBinaryReader.ReadInt32() in c:\dev\NMS.1.4.x\src\main\csharp\Util\EndianBinaryReader.cs:line 135 at Apache.NMS.ActiveMQ.OpenWire.OpenWireFormat.Unmarshal(BinaryReader dis) in c:\dev\NMS.ActiveMQ.1.4.x\src\main\csharp\OpenWire\OpenWireFormat.cs:line 246 at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop() in c:\dev\NMS.ActiveMQ.1.4.x\src\main\csharp\Transport\Tcp\TcpTransport.cs:line 278 2010-11-23 14:33:53,987 [35936] [INFO ] Apache.NMS.Tracer - RECEIVED: Response[ commandId = 0, responseRequired = False, CorrelationId = 1 ] 2010-11-23 14:33:53,987 [35936] [DEBUG] Apache.NMS.Tracer - Unknown response ID: 0 for response: Response[ commandId = 0, responseRequired = False, CorrelationId = 1 ] 2010-11-23 14:33:54,972 [tcp://qgmqbeta1:10200/?transport.UseInactivityMonitor=falsetransport.UseLogging=true] [DEBUG] Apache.NMS.Tracer - Connect fail to: tcp://qgmqbeta1:10200/?transport.UseInactivityMonitor=falsetransport.UseLogging=true, reason: Error connecting to qgmqbeta1:10200. 2010-11-23 14:33:54,972 [311324] [DEBUG] Apache.NMS.Tracer - Send Oneway attempt: 3080 failed: Message = The given key was not present in the dictionary. 2010-11-23 14:33:54,972 [311324] [DEBUG] Apache.NMS.Tracer - Failed Message Was: ProducerInfo[ commandId = 465, responseRequired = False, ProducerId = ID:SXALPHA3-53063-634261156397986117-1:0:1:3, Destination = queue://nms.keepAlive, BrokerPath = , DispatchAsync = False, WindowSize = 0 ] 2010-11-23 14:33:54,972 [311324] [WARN ] Apache.NMS.Tracer - Transport failed to tcp://qgmqdev1:10200/?transport.UseInactivityMonitor=falsetransport.UseLogging=true, attempting to automatically reconnect due to: The given key was not present in the dictionary. 2010-11-23 14:33:54,972 [311324] [DEBUG] Apache.NMS.Tracer - Connection: Transport has been Interrupted. 2010-11-23 14:33:54,972 [311324] [DEBUG] Apache.NMS.Tracer - transport interrupted, dispatchers: 0 2010-11-23 14:33:54,972 [311324] [INFO ] Apache.NMS.Tracer - Waiting for transport to reconnect. 2010-11-23 14:33:54,972 [219716] [DEBUG] Apache.NMS.Tracer - Attempting async connect to: tcp://qgmqbeta1:10200/?transport.UseInactivityMonitor=falsetransport.UseLogging=true 2010-11-23 14:33:54,972 [219716] [DEBUG] Apache.NMS.Tracer - Attempting async connect to: tcp://qgmqdev1:10200/?transport.UseInactivityMonitor=falsetransport.UseLogging=true 2010-11-23 14:33:54,972 [tcp://qgmqbeta1:10200/?transport.UseInactivityMonitor=falsetransport.UseLogging=true] [DEBUG] Apache.NMS.Tracer - Opening socket to: qgmqbeta1 on port: 10200 2010-11-23 14:33:54,972 [tcp://qgmqdev1:10200/?transport.UseInactivityMonitor=falsetransport.UseLogging=true] [DEBUG] Apache.NMS.Tracer - Opening socket to: qgmqdev1 on port: 10200 2010-11-23 14:33:54,972 [tcp://qgmqdev1:10200/?transport.UseInactivityMonitor=falsetransport.UseLogging=true] [DEBUG] Apache.NMS.Tracer - Connected to qgmqdev1:10200 using InterNetwork protocol. 2010-11-23 14:33:54,972 [219716] [INFO ] Apache.NMS.Tracer - SENDING: WireFormatInfo[ Magic=ActiveMQ Version=6 MarshalledProperties={CacheEnabled=False, StackTraceEnabled=False, TcpNoDelayEnabled=True, MaxInactivityDuration=3, TightEncodingEnabled=False, CacheSize=0, SizePrefixDisabled=False, MaxInactivityDurationInitialDelay=1} ] 2010-11-23 14:33:54,972 [219716] [INFO ] Apache.NMS.Tracer - Restoring previous transport connection. 2010-11-23 14:33:54,972 [187132] [INFO ] Apache.NMS.Tracer - RECEIVED: WireFormatInfo[ Magic=ActiveMQ Version=6 MarshalledProperties={StackTraceEnabled=True, CacheEnabled=True, TcpNoDelayEnabled=True, MaxInactivityDuration=3, MaxInactivityDurationInitalDelay=1, TightEncodingEnabled=True, CacheSize=1024, SizePrefixDisabled=False} ] 2010-11-23
Re: ActiveMQ 5.4.1 Error
I can reproduce this. On Windows, start a brand new broker. Once everything is up and running, use Task Manager to forcefully kill the executable. Attempt to start the broker, and it will never come up. It has gone into a wedged state upon abnormal termination. If that is enough of a detailed set of steps, I'll write them up in a JIRA. On Thu, Nov 4, 2010 at 4:30 AM, ajitroy ajit.kumar@gmail.com wrote: Not exactly. It happened once and we can get going only after deleting KahaDB folder. However i can say for sure it happened after restart. Before restart it was working all fine and then it started giving this exception and same case with subsequent restart. -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-1-Error-tp3026574p3026855.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ 5.4.1 Error
Hi Dejan, Yes, it appears that my problem has been resolved in the latest snapshot build. That's great! Thanks for referencing that for me. So, I guess I can't reproduce ajitroy's issue. -Jim On Thu, Nov 4, 2010 at 10:17 AM, Dejan Bosanac de...@nighttale.net wrote: Hi Jim, what you're describing sounds like https://issues.apache.org/activemq/browse/AMQ-2935 which is resolved on the trunk. This null pointer exception seems different than one one shown in that issue. Can you confirm when kind of exception are you getting after the restart (and try 5.5-SNAPSHOT if you're dealing with AMQ-2935) Cheers -- Dejan Bosanac - FuseSource - The experts in open source integration and messaging. Email: dej...@fusesource.com Web: http://fusesource.com Twitter: http://twitter.com/dejanb ActiveMQ in Action - http://www.manning.com/snyder/ Blog - http://www.nighttale.net On Thu, Nov 4, 2010 at 6:09 PM, Jim Gomes e.se...@gmail.com wrote: I can reproduce this. On Windows, start a brand new broker. Once everything is up and running, use Task Manager to forcefully kill the executable. Attempt to start the broker, and it will never come up. It has gone into a wedged state upon abnormal termination. If that is enough of a detailed set of steps, I'll write them up in a JIRA. On Thu, Nov 4, 2010 at 4:30 AM, ajitroy ajit.kumar@gmail.com wrote: Not exactly. It happened once and we can get going only after deleting KahaDB folder. However i can say for sure it happened after restart. Before restart it was working all fine and then it started giving this exception and same case with subsequent restart. -- View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-1-Error-tp3026574p3026855.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ 5,4.0 Security plugin and destinationPolicy
Try putting the tags in alphabetical order. - Jim -Original Message- From: Theo Bot theo@proxy.nl Sender: thg@gmail.com Date: Sun, 22 Aug 2010 16:15:48 To: users@activemq.apache.org Reply-To: users@activemq.apache.org Subject: ActiveMQ 5,4.0 Security plugin and destinationPolicy Hi all, When I combine the activemq-security.xml and the activemq.stomp.xml activemq won't start. I tracked it down to the destinationPolicy tags. When I removed this block the server started again. Can anybody help me out? -- Met vriendelijke groet, Theo Bot Network Management Engineer e-mail: theo@proxy.nl Website: http://www.proxy.nl LinkedIn: http://www.linkedin.com/in/theobot
Re: Can I use NMS .NET Compact Framework libs in .NET 3.5?
Hi Tammer, I work with the .NET platform a lot, but not with the Compact Framework versions. The answer to your question depends upon whether .NET CF 3.5 has a different CLR (Common Language Runtime) than .NET CF 2.0. I have tried doing some research to answer that question, and I haven't been able to find a definitive answer. I was able to find some indications that NETCF3.5 would run assemblies targeted to previous versions. Therefore, I am reasonably confident that you should be able to use these assemblies on a NETCF3.5 platform. I have added prototype support for generating NETCF3.5 assemblies to the NAnt scripts. However, NAnt itself does not support that platform yet, so the code doesn't do anything yet. Best of Luck, Jim On Mon, Apr 12, 2010 at 3:34 PM, Tammer Salem tammer.sa...@googlemail.comwrote: Hello All, NMS/C# question - can I use the .netcf v2.0 DLLs (specifically Stomp) within .NET CF v3.5? (Sorry I'm a Java developer and am not sure how this works in C# world) Thanks in advance, Tammer
Re: [ANNOUNCE] Apache.NMS.ActiveMQ v1.2.0 Released
Tim, The doc files are being generated by the NAnt script. In the nant-common.xml file, the following csc task line is used: csc if=${current.build.keysign} keyfile=${snk.file} target=library define=${current.build.defines} warnaserror=false debug=${csc.debug} optimize=${csc.optimize} output=${build.bin.dir}/${project.name}.dll * doc=${build.bin.dir}/${project.name}.xml* I have updated the package.ps1 scripts files in the trunk and the 1.2.x branch to start including these files when the ZIP files are created. In the meantime, what would be an easy way to release the XML files for those that want them? On Fri, Feb 12, 2010 at 11:10 AM, Timothy Bish tabish...@gmail.com wrote: On Fri, 2010-02-12 at 11:04 -0800, magellings wrote: Tim can you include the .xml intellisense files with the binaries? These provide good user experience when developing against the referenced NMS framework classes. Right click project Properties Build check XML documentation file. Then when you include the xml file in the same folder as the dll you can see all the xml comments done on the NMS classes. -Thanks They only way this would get included was if there was some automated way to generate them from nant as I don't use Visual Studio to build or test the project, everything is done via command line so it can be done via automation. If you have some way to do this that we could include into the nant scripts and packaging script we'd welcome the patch. Regards -- Tim Bish Open Source Integration: http://fusesource.com ActiveMQ in Action: http://www.manning.com/snyder/ Follow me on Twitter: http://twitter.com/tabish121 My Blog: http://timbish.blogspot.com/
Re: [ANNOUNCE] Apache.NMS.ActiveMQ v1.2.0 Released
Good idea. I'll put them out there. On Fri, Feb 12, 2010 at 1:59 PM, Timothy Bish tabish...@gmail.com wrote: On Fri, 2010-02-12 at 13:54 -0800, Jim Gomes wrote: Tim, The doc files are being generated by the NAnt script. In the nant-common.xml file, the following csc task line is used: csc if=${current.build.keysign} keyfile=${snk.file} target=library define=${current.build.defines} warnaserror=false debug=${csc.debug} optimize=${csc.optimize} output=${build.bin.dir}/${project.name}.dll * doc=${build.bin.dir}/${project.name}.xml* I have updated the package.ps1 scripts files in the trunk and the 1.2.x branch to start including these files when the ZIP files are created. In the meantime, what would be an easy way to release the XML files for those that want them? Short of releasing a 1.2.1 release you could make them available in you people.apache.org account for the time being. Regards -- Tim Bish Open Source Integration: http://fusesource.com ActiveMQ in Action: http://www.manning.com/snyder/ Follow me on Twitter: http://twitter.com/tabish121 My Blog: http://timbish.blogspot.com/
Re: [ANNOUNCE] Apache.NMS.ActiveMQ v1.2.0 Released
The next release of NMS will include the XML documentation files. Until then, the document files can be downloaded separately from the following location: http://people.apache.org/~jgomes/NMSDocFiles-1.2.0.zip On Fri, Feb 12, 2010 at 11:04 AM, magellings mark.gelli...@qg.com wrote: Tim can you include the .xml intellisense files with the binaries? These provide good user experience when developing against the referenced NMS framework classes. Right click project Properties Build check XML documentation file. Then when you include the xml file in the same folder as the dll you can see all the xml comments done on the NMS classes. -Thanks
Re: Broken Links to NMS
Thanks for the heads up. I updated the WIKI, so this page should be regenerated soon. On Fri, Jan 29, 2010 at 8:18 AM, Michael.Murphree michael.murph...@compuware.com wrote: Greetings, There is an additional broken link on http://activemq.apache.org/openwire.html The NMS item link is http://activemq.apache.org/NMS/index.html but it appears it ought to be http://activemq.apache.org/nms/index.html Regards, Michael -- View this message in context: http://old.nabble.com/Broken-Links-to-NMS-tp13858365p27374328.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: My NMS topic consumer dies after 1 message
I'm not sure how this worked in Java, but the way I read the code, the behavior you are describing is not surprising. There is nothing in the run() function to keep that thread alive after it has received one message. I would expect it to terminate after receiving the message. To keep it alive and processing more messages, you will need some kind of looping mechanism. On Wed, Jan 27, 2010 at 5:01 PM, slyfox bobby.richa...@gmail.com wrote: Working fine in java but switched a client over to C#, producer worked, consumer works, just dies after 1 message: ## using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using Apache.NMS; using Apache.NMS.ActiveMQ; using Apache.NMS.Util; namespace QuoteProvider { public class JMSQuoteProvider : IJMSQuoteSource { protected static AutoResetEvent semaphore = new AutoResetEvent(false); protected static ITextMessage message = null; protected static TimeSpan receiveTimeout = TimeSpan.FromSeconds(10); public event ActionIncomingQuote QuoteArrived; public JMSQuoteProvider() { Thread JMSQuotes = new Thread(new ThreadStart(run)); JMSQuotes.IsBackground = true; JMSQuotes.Priority = ThreadPriority.Normal; JMSQuotes.Start(); } private void run() { Uri connecturi = new Uri(activemq:tcp://127.0.0.1:61616?consumer.dispatchAsync=true); IConnectionFactory factory = new NMSConnectionFactory(connecturi); using (IConnection connection = factory.CreateConnection()) using (ISession session = connection.CreateSession()) { IDestination destination = session.GetTopic(PX.UPDATE); using (IMessageConsumer consumer = session.CreateConsumer(destination)) { connection.Start(); consumer.Listener += new MessageListener(OnMessage); semaphore.WaitOne(); if (message != null) { crack(message.Text.ToString()); } } } } private void crack(String msg) { // crack logic // IncomingQuote tempQuote = new IncomingQuote(symbol, bid, ask, stamp); QuoteArrived(tempQuote); } protected static void OnMessage(IMessage receivedMsg) { message = receivedMsg as ITextMessage; semaphore.Set(); } #region IJMSQuoteSource Members protected virtual void OnQuoteArrived(IncomingQuote quote) { if (QuoteArrived != null) QuoteArrived(quote); } #endregion } } -- View this message in context: http://old.nabble.com/My-NMS-topic-consumer-dies-after-1-message-tp27349478p27349478.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ NMS : Listener (.Net vs WCF)
The WCF library creates endpoint connection mappings. If you are doing WCF style programming, this is the higher level library you would use. If your application is not designed around WCF, then you don't need it. Use the normal NMS API interfaces. - Jim -Original Message- From: Timothy Bish tabish...@gmail.com Date: Tue, 19 Jan 2010 09:06:25 To: users@activemq.apache.org Subject: Re: ActiveMQ NMS : Listener (.Net vs WCF) On Tue, 2010-01-19 at 01:21 -0800, titexe wrote: Hello, i'm trying to develop listener for my application in .Net, Two solution are available : 1- Listener .Net NMS Activemq 2- Listener WCF NMS Activemq the first solution, don't handle exeptions of listener, like network interruption, retryetc I would like to know the difference between them, and what is the best practice ? The newest version of Apache.NMS.ActiveMQ 1.2.0 which is in the process of being released now has improved Failover support and a Connection inactivity monitor which should detect dropped connections much quicker. You may want to give that a try. The download page for the Apache.NMS 1.2.0 release is here: http://activemq.apache.org/nms/activemq-net-120-release.html The latest release candidate of Apache.NMS.ActiveMQ is here: http://people.apache.org/~tabish/nms.activemq-1.2.0/ I don't really know much about the WCF NMS lib so I can't provide you with and comparison of its capabilities vs the ActiveMQ lib. Regards Tim. -- Tim Bish http://fusesource.com http://timbish.blogspot.com/
Re: NMS: How to specify Bitwize operations in selectors
I'm not sure that what you are attempting to do is supported by ActiveMQ. When you pass in a selector like that, it is essentially a script that is run at the broker. NMS does not process the selector statement. You'll need to consult the JMS spec and the ActiveMQ implementation to see if bitwise logic is supported. My guess is that it is not. You'll most likely need to re-implement your message objects so that they can use normal boolean logic instead of bitwise logic. On Tue, Sep 8, 2009 at 11:20 AM, gtsafas gtsa...@rblt.com wrote: I am trying to configure a consumer so it only receives messages that have the 2nd bit in the ‘Status’ (user defined INT property) as 0. I came up with the following code but I get this Exception… “An unhandled exception of type 'Apache.NMS.ActiveMQ.BrokerException' occurred in Apache.NMS.ActiveMQ.dll Additional information: javax.jms.JMSException : Couldn't create TopicSubscription” IMessageConsumer consumer = session.CreateConsumer(destination, Status 2 = 0); Thanks in advance. -- View this message in context: http://www.nabble.com/NMS%3A-How-to-specify-Bitwize-operations-in-selectors-tp25351496p25351496.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMS / ActveMQ questions regarding network of brokers and ByteMessages.
NMS does not support the BlobMessage, but if you can access the large files via a URL, then could you just send a TextMessage with the URL? On Thu, Jul 16, 2009 at 1:03 AM, Michel Van Hoof mvh...@thisplays2.comwrote: Hi, After reading just about every article, documentation and forum about ActiveMQ / NMS the last couple of weeks, a couple of things are still unclear so i was hoping someone here could enlighten me :s ByteMessages We are looking at a situation where a lot of files between 5 to 200Mb (ocasionally more but is seldom) should be sent through the MQ. These 'messages' could be present in a queue for a long while (multiple days) since the clients are bandwidth restricted for their downloads. A network of brokers would be in place ( unrestricted ) to get the message as close as possible to the client. Now i know the standard is: for long term storage, use a database, but this would create a lot of overhead in our enviroment .. Now my question is: what is the best way to configure ActiveMQ for this without killing the machine(s) ? We would use PostGresql as JDBC journal but should we cache the messages locally on disk too ? Will ActiveMQ keep these messages in memory ? Can we avoid this ? Can we make sure new messages would still arrive in the queue even if it has multiple 100's of MB's in queue for that specific client ? Does NMS support the BlobMessage so we could just pass a url ( all files are already hosted) thanks ! -- View this message in context: http://www.nabble.com/NMS---ActveMQ-questions-regarding-network-of-brokers-and-ByteMessages.-tp24512112p24512112.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
[ANNOUNCE] ActiveMQ .NET 1.1.0 Released
The ActiveMQ .NET 1.1.0 Client is now shipping. You can find full details regarding this release, including instructions on how to download the binary distribution, at the following website: http://activemq.apache.org/nms/activemq-net-110-release.html Please enter any bugs or enhancement requests into the JIRA database at the following website: https://issues.apache.org/activemq/browse/AMQNET Thank you for your continued support and contributions!
Re: uses virtual topic and ClientAcknowledge to submit themessage occured probem
I created some virtual topic tests for NMS awhile ago, and they are all working. You can view the tests in VirtualTopicTest.cs in the Apache.NMS.ActiveMQ project. Regarding this particular problem, I would have to do further investigation to find the ultimate source of the problem. - Jim -Original Message- From: magellings mark.gelli...@qg.com Date: Mon, 29 Jun 2009 10:12:58 To: users@activemq.apache.org Subject: Re: uses virtual topic and ClientAcknowledge to submit the message occured probem Is this an NMS specific problem or with the actual broker? I see the link below but the user is saying everything works with java code. Does anyone know what version of ActiveMQ Virtual Topics did work? http://activemq.apache.org/virtual-destinations.html pclovec wrote: i try to test virtual topic found out the isssue 1.create cosumer.a.virtualtopic.test queue. 2.create cosumer.b.virtualtopic.test queue. 3.create virtualtopic.test queue 4.send message into topic 5 consumer a and b can got the message ,but i want to try to submit the server it occure error ---msga.Acknowledge(); i uses NMS and NMS.ActiveMQ it's issue?. or just i missing something. but i try to uses java code test it . everything is work. thanks 2009-03-12 17:34:06,885 [/127.0.0.1:1366] ERROR Service - Async error occurred: java.lang.IllegalArgumentException: The subscription does not exist: c91df03f-0766-493e-b1db-dacfd9a5e9df:2:1 java.lang.IllegalArgumentException: The subscription does not exist: c91df03f-0766-493e-b1db-dacfd9a5e9df:2:1 at org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:364) at org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:462) at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194) at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74) at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74) at org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85) at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:456) at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205) at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305) at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179) at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68) at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143) at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206) at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185) at java.lang.Thread.run(Thread.java:619) -- View this message in context: http://www.nabble.com/uses-virtual-topic---and-ClientAcknowledge-to-submit-the-message-occured-probem-tp22486742p24258128.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: uses virtual topic and ClientAcknowledge to submit themessageoccured probem
Thanks for the offer of help. I am not sure where the problem is. I have seen broker problems with virtual topics if queue mirroring is turned on, so it is possible the error is in the broker. It would be good to test against the latest ActiveMQ 5.3 snapshot. - Jim -Original Message- From: magellings mark.gelli...@qg.com Date: Mon, 29 Jun 2009 11:56:20 To: users@activemq.apache.org Subject: Re: uses virtual topic and ClientAcknowledge to submit themessage occured probem Hey Jim thanks for the response. I took a look at your test. I too can receive messages just fine with a transactional session. The problem is that the message does not get removed from the queue when you commit the session. Instead the broker writes to the log an error like the following and the next time around the consumer gets the same message as redelivered. I'm wondering if this error is due to how NMS connects to the broker or something internal to the broker itself. If it is NMS than I'd be more than willing to take a closer look. Thoughts? 2009-06-29 13:50:36,340 [//10.0.1.5:1766] ERROR Service - Async error occurred: java.lang.IllegalArgumentException: The subscription does not exist: a7e81a30-fa47-4d35-b8ca-3641a1457f11:1:1 java.lang.IllegalArgumentException: The subscription does not exist: a7e81a30-fa47-4d35-b8ca-3641a1457f11:1:1 at org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:364) at org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:462) at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194) at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74) at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74) at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74) at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74) at org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85) at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:456) at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205) at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305) at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179) at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68) at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143) at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206) at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185) at java.lang.Thread.run(Unknown Source) semog wrote: I created some virtual topic tests for NMS awhile ago, and they are all working. You can view the tests in VirtualTopicTest.cs in the Apache.NMS.ActiveMQ project. Regarding this particular problem, I would have to do further investigation to find the ultimate source of the problem. - Jim -Original Message- From: magellings mark.gelli...@qg.com Date: Mon, 29 Jun 2009 10:12:58 To: users@activemq.apache.org Subject: Re: uses virtual topic and ClientAcknowledge to submit the message occured probem Is this an NMS specific problem or with the actual broker? I see the link below but the user is saying everything works with java code. Does anyone know what version of ActiveMQ Virtual Topics did work? http://activemq.apache.org/virtual-destinations.html pclovec wrote: i try to test virtual topic found out the isssue 1.create cosumer.a.virtualtopic.test queue. 2.create cosumer.b.virtualtopic.test queue. 3.create virtualtopic.test queue 4.send message into topic 5 consumer a and b can got the message ,but i want to try to submit the server it occure error ---msga.Acknowledge(); i uses NMS and NMS.ActiveMQ it's issue?. or just i missing something. but i try to uses java code test it . everything is work. thanks 2009-03-12 17:34:06,885 [/127.0.0.1:1366] ERROR Service - Async error occurred: java.lang.IllegalArgumentException: The subscription does not exist: c91df03f-0766-493e-b1db-dacfd9a5e9df:2:1 java.lang.IllegalArgumentException: The subscription does not exist: c91df03f-0766-493e-b1db-dacfd9a5e9df:2:1 at org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:364) at org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:462) at
Re: Discovery and NMS
Eric, Thanks for trying that out. At this point there isn't much more to try out since Tim has also confirmed that discovery is not working. We will push this out to the next version of NMS because we want to get 1.1 shipped. I don't think the next version will take as long as this one and discovery is the first major feature scheduled to be worked on. However if we are able to find a simple fix that can be thrown in during the release phase, I'm sure it can be considered. - Jim -Original Message- From: Eric Bouer ericbo...@gmail.com Date: Wed, 10 Jun 2009 14:21:37 To: users@activemq.apache.org Subject: Re: Discovery and NMS Hello Jim Unfortunately I can't confirm it's working Using activemq:failover (discovery:multicast://default,tcp://activemqhost:61616) I've got : Connect fail to 'discovery:multicast://default': Composite connection not supported with MulticastDiscovery transport. Using activemq:discovery:multicast://default I've got: Connect failed :Apache.NMS.NMSConnectionException: Unable to find a connection to discovery:multicast://default before the timeout period expired. at Apache.NMS.ActiveMQ.Transport.Discovery.DiscoveryTransportFactory.CreateTransport(Uri location) at Apache.NMS.ActiveMQ.Transport.TransportFactory.CreateTransport(Uri location) at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnection(String userName, String password) at Apache.NMS.ActiveMQ.ConnectionFactory.CreateConnection() at ActiveMQConnector.MQ.Connect() Tried again trunk from today. Can I help you with more information or anything else? Thanks. Eric. semog wrote: Hi Eric (And John West), I haven't been able to get the auto-discovery to work yet, but from your sample connection strings, I think you will need to change them to the following to have any chance of getting them to work: activemq:discovery:multicast://default or activemq:failover:discovery:multicast://default Parenthesis are also acceptable as follows: activemq:discovery:(multicast://default) activemq:failover:(discovery:multicast://default,tcp://activemqhost:61616) The key is to have the prefix of activemq:. If you don't have that, then the correct connection factory will not be loaded by NMS. Make sure you update to the latest code and rebuild the Apache.NMS and Apache.NMS.ActiveMQ projects before trying anything. The discovery protocol stuff is not my area of expertise, so I'm still attempting to figure out the mechanisms behind it. Best, Jim -- View this message in context: http://www.nabble.com/Discovery-and-NMS-tp22812691p23971301.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Idle Connection Timeout in ActiveMQ 5.0
Is this still happening with the keepalive messages? If it is, have you tried using the failover connections? --Original Message-- From: simone_b To: ActiveMQ Users ReplyTo: ActiveMQ Users Subject: Re: Idle Connection Timeout in ActiveMQ 5.0 Sent: May 28, 2009 2:31 AM I second this. I notice that some consumers get disconnected after some time that they don't receive messages. mythz wrote: Is there a way to change the idle connection timeout for consumers in ActiveMQ v5.0? I'm having a problem that wasn't happening in ActiveMQ v4.x where the connection of a consumer thats listening to a topic that is idle for about an hour or so will 'silently die'. i.e. the connection dies (and is removed from the JMX console) on the broker however no exception was thrown in the c# openwire client. Is there a way that we can either reconfigure the idle connection timeout, or fix the c# openwire client so that idle connection timeouts raises exceptions? -- View this message in context: http://www.nabble.com/Idle-Connection-Timeout-in-ActiveMQ-5.0-tp15308619p23758380.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. - Jim
Re: Discovery and NMS
Hi Eric, I have been trying to test whether discovery works, but I am not sure I have things configured correctly. I usually turn off the auto-discovery on the broker because we have so many in our development environment that they start to cross-talk with each other and contaminate our tests. I'm more than happy to try some different scenarios out and add in some unit tests if there is a particular scenario you want to try out. Anybody else configured a broker and a client (Java) for auto-discovery? - Jim On Mon, Jun 1, 2009 at 9:33 AM, Eric Bouer ericbo...@gmail.com wrote: Can anyone confirm it's working ? Or any other information on discovery in NMS ? semog wrote: I have not used the discovery code additions. Are there any unit test samples that use it that might give you an idea on the format? If there aren't, we should probably add some. You may want to look around for a Java sample. No guarantees, but it might give an indication on what the format might be. On Tue, Mar 31, 2009 at 1:59 PM, JohnWest john.w...@starz.com wrote: I tried using Discovery to find my ActiveMQ broker from an NMS client. The broker config includes: transportConnectors transportConnector name=openwire uri=tcp://localhost:61616 discoveryUri=multicast://default/ transportConnector name=ssl uri=ssl://localhost:61617/ transportConnector name=stomp uri=stomp://localhost:61613/ transportConnector name=xmpp uri=xmpp://localhost:61222/ /transportConnectors In the pub/sub sample publisher, I setup the following: const string BROKER = discovery:(multicast://default)?initialReconnectDelay=100; This got me an error parsing IP address error out of the Discovery Agent. What am I doing wrong? -- View this message in context: http://www.nabble.com/Discovery-and-NMS-tp22812691p22812691.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Discovery-and-NMS-tp22812691p23817901.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Discovery and NMS
There are some problems in its address parsing code that I am working on right now. I have not been able to confirm anthing beyond that yet. - Jim -Original Message- From: Eric Bouer ericbo...@gmail.com Date: Mon, 1 Jun 2009 09:33:47 To: users@activemq.apache.org Subject: Re: Discovery and NMS Can anyone confirm it's working ? Or any other information on discovery in NMS ? semog wrote: I have not used the discovery code additions. Are there any unit test samples that use it that might give you an idea on the format? If there aren't, we should probably add some. You may want to look around for a Java sample. No guarantees, but it might give an indication on what the format might be. On Tue, Mar 31, 2009 at 1:59 PM, JohnWest john.w...@starz.com wrote: I tried using Discovery to find my ActiveMQ broker from an NMS client. The broker config includes: transportConnectors transportConnector name=openwire uri=tcp://localhost:61616 discoveryUri=multicast://default/ transportConnector name=ssl uri=ssl://localhost:61617/ transportConnector name=stomp uri=stomp://localhost:61613/ transportConnector name=xmpp uri=xmpp://localhost:61222/ /transportConnectors In the pub/sub sample publisher, I setup the following: const string BROKER = discovery:(multicast://default)?initialReconnectDelay=100; This got me an error parsing IP address error out of the Discovery Agent. What am I doing wrong? -- View this message in context: http://www.nabble.com/Discovery-and-NMS-tp22812691p22812691.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Discovery-and-NMS-tp22812691p23817901.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ usage from C# (WITHOUT SPRING.NET)
This is a bug that was fixed. If you get latest you should have better success. - Jim -Original Message- From: pclovec pclo...@gmail.com Date: Thu, 12 Mar 2009 15:49:22 To: users@activemq.apache.org Subject: Re: ActiveMQ usage from C# (WITHOUT SPRING.NET) i used the dll now ,but i didn't saw this issue. did u build the dll by self.? padcom wrote: Hi there, I'm hoping someone here will be able to help me out as this is getting pretty interesting for me. Here's the problem: using Apache.NMS; using Apache.NMS.ActiveMQ; namespace JMSTest { class Program { static void Main(string[] args) { IConnectionFactory factory = new ConnectionFactory(tcp://localhost:61616/); IConnection connection = factory.CreateConnection(); ISession session = connection.CreateSession(); } } } Would anyone please explain to me what am I doing wrong that I can't even create a session? I have my ActiveMQ instance up and running, other clients (Java) work just fine, but doing just that in C# throws the following exception: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. Parameter name: length at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) at System.String.Substring(Int32 startIndex, Int32 length) at Apache.NMS.ActiveMQ.OpenWire.StringPackageSplitter.StringPackageSplitterEnumerator.System.Collections.IEnumerator.get_Current() at Apache.NMS.ActiveMQ.OpenWire.OpenWireBinaryWriter.Write(String text) at Apache.NMS.ActiveMQ.OpenWire.BaseDataStreamMarshaller.LooseMarshalString(String value, BinaryWriter dataOut) at Apache.NMS.ActiveMQ.OpenWire.V2.ConnectionIdMarshaller.LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) at Apache.NMS.ActiveMQ.OpenWire.OpenWireFormat.LooseMarshalNestedObject(DataStructure o, BinaryWriter dataOut) at Apache.NMS.ActiveMQ.OpenWire.BaseDataStreamMarshaller.LooseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, BinaryWriter dataOut) at Apache.NMS.ActiveMQ.OpenWire.V2.ConnectionInfoMarshaller.LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) at Apache.NMS.ActiveMQ.OpenWire.OpenWireFormat.Marshal(Object o, BinaryWriter ds) at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.Oneway(Command command) : Transport connection error: Index and length must refer to a location within the string. Parameter name: length Please help!!! Best regards, Maciej -- View this message in context: http://www.nabble.com/ActiveMQ-usage-from-C--%28WITHOUT-SPRING.NET%29-tp22485816p22486794.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMS Providers and free CI server available
Hi Mark, Thanks for the info. That's definitely something to look into. Right now I am working on the packaging scripts for gathering up the binaries and source code into separate ZIP files. There's still some more automation that needs to be added before it can be completely hands-free. Best, Jim On Wed, Mar 4, 2009 at 8:40 AM, magellings mark.gelli...@qg.com wrote: This isn't a question but an FYI for the ActiveMQ NMS Provider team. Jetbrains is offering free CI for OSS now. If you do not know or have not looked into CI it is very beneficial and I recommend researching. http://tinyurl.com/bv4jn4 -Mark (mark.gelli...@qg.com) -- View this message in context: http://www.nabble.com/NMS-Providers-and-free-CI-server-available-tp22333905p22333905.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ Blocked when memory is full
This looks suspiciously related to a problem that we have been encountering, but have been unable to narrow down. I don't know if there is an existing JIRA for this, but if there is, I'd vote for it. Top priority. Thanks for reporting your insights on this issue. On Thu, Feb 19, 2009 at 2:57 AM, fehm felix@cern.ch wrote: Hi, seems like its still a problem in 5.2.0 (fuse 5.2.0.2). The problem is quite easy to reproduce: 1.Limit the memoryUsage in activemq.xml to -say- 50MB. 2.set producer flow control=false and disable saving messages to disk. 2.Start one producer publishing non-persistent messages with TTL=5sec in a loop. 3.One/Several consumers receiving one message using consumer.receive() and then sleep for a second (also in a loop). You can sit back and watch the memory percent usage in JMX increasing. When 100% is reached the consumer stops receiving messages, but the producer keeps running and therefore increasing the memory. Starting a new consumer will result in this exception : javax.jms.JMSException: Unexpected error occured at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49) at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1773) at org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1790) at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99) at org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:114) at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99) at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:99) at org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:152) at org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:244) at org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:96) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:194) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.IOException: Unexpected error occured at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:192) ... 1 more Caused by: java.lang.ClassCastException: org.apache.activemq.command.BrokerId cannot be cast to org.apache.activemq.command.ConsumerId at org.apache.activemq.openwire.v4.MessageMarshaller.tightUnmarshal(MessageMarshaller.java:75) at org.apache.activemq.openwire.v4.ActiveMQMessageMarshaller.tightUnmarshal(ActiveMQMessageMarshaller.java:66) at org.apache.activemq.openwire.v4.ActiveMQTextMessageMarshaller.tightUnmarshal(ActiveMQTextMessageMarshaller.java:66) at org.apache.activemq.openwire.OpenWireFormat.tightUnmarshalNestedObject(OpenWireFormat.java:453) at org.apache.activemq.openwire.v4.BaseDataStreamMarshaller.tightUnmarsalNestedObject(BaseDataStreamMarshaller.java:126) at org.apache.activemq.openwire.v4.MessageDispatchMarshaller.tightUnmarshal(MessageDispatchMarshaller.java:71) at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:362) at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:276) at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:210) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:202) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185) ... 1 more Sadly, only a broker restart solves the problem. Cheers, Felix rajdavies wrote: To be honest this looks like a bug in the Memory Usage stats :( - though I believe its fixed in the 5.2 release thanks, Rob On 7 Oct 2008, at 22:38, victorbp wrote: Thanks Rob! Now I'm able to receive all the messages using disk spooling, but I see an odd behaviour: when the memory is full and the broker starts to save the messages in disk, I can see in JConsole that the MemoryPercentUsage property increases significantly, much higher than 100% (In some test the value is close to 3000%). I'm not sure about this value, I guess that ActiveMQ takes all the space (memory and disk) like the same and thats why I see this increase, but what worries me is that once that the broker start to save in disk and the memory is increased, it doesn't decrease, I mean, all the time is like the memory was full, even if I don't send messages and all the previous messages was consumed. Do you know if this is a normal behaviour or how can I decrease this memory usage? Thanks a lot! -- View this message in context: http://www.nabble.com/ActiveMQ-Blocked-when-memory-is-full-tp19841470p19867887.html Sent from the ActiveMQ - User mailing
Re: Estimated release date for ActiveMQ NMS 1.1
Hi, I don't have an estimate yet, but I want to get it completed soon. I have several of my own projects that are going into wide-spread production, and it would be good to have it stabilized. I'm working on getting some of the outstanding issues whittled down in order to make this happen. Some issues may be bumped to 1.2, but those will be decided on a case-by-case basis. The major features of 1.1 have been put into place and are currently being used/tested/verified by various people. Feel free to report back any of your experiences, both positive and negative. Thanks, Jim On Wed, Feb 18, 2009 at 2:17 PM, magellings mark.gelli...@qg.com wrote: Could anyone tell me if there is an estimated release date for NMS 1.1? I see there are only a few more open issues in the JIRA. -- View this message in context: http://www.nabble.com/Estimated-release-date-for-ActiveMQ-NMS-1.1-tp22089569p22089569.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Q Consumers stop receiving messages
Hi Bill, Thanks for the tips and suggestions. I'll take a look at giving them a try. Right now our data store is the default Kaha data store. I had wondered if switching to some other data store might improve things. - Jim On Thu, Feb 5, 2009 at 4:41 AM, Bill Schuller bill_schul...@intuit.comwrote: We ran into a similar problem with one of our ActiveMQ implementations. My theory was that messages were being paged out of memory and the consumers were consuming faster than the dispatch queue could be re-filled. We made a plethora of changes all at once, but here was the tact I took: 1. Faster datastore (switch from journaled JDBC/Derby to AMQ Message Store) 2. Switch from store-based cursors to file-based cursors (if we were for some reason married to the JDBC datastore) 3. Increase the size of the dispatch queue, forcing a larger store fetch (default is 200 msgs): policyEntry queue= maxPageSize=5000/ 4. Increase the heap and memoryUsage limits to allow for more memory memoryUsage limit=3 gb / Since by default AMQ uses store-based cursors for persistent messages and only uses a special file-based cursor for non-persistent messages, a slow datastore could be your problem. Non-persistent message never hit the datastore, so the would not be affected. Best of luck, curious if this addresses your problem. On 1/30/09 6:02 PM, Jim Gomes e.se...@gmail.com wrote: This seems very similar to a problem we are experiencing with the broker halting dispatch of messages to consumers that are ready and able to receive messages. --- Bill Schuller, Service Foundations Engineering, Intuit Inc.
Re: Transactional Send Messages (NMS)
Hi Bryan, Great! I'm glad everything is working for you now. I can see how it might be a bit unclear, but I think it is there for historical reasons. Best, Jim On Wed, Feb 4, 2009 at 4:01 PM, Bryan Murphy bmurphy1...@gmail.com wrote: On Tue, Feb 3, 2009 at 11:47 AM, Jim Gomes e.se...@gmail.com wrote: That sounds like a bug. My understanding of how sessions work is if you have set the AcknowledgementMode.Transactional, none of the messages that you send to producers created on that session will be visible to any consumers until the Commit() function is called. At that point, all messages sent up to that point will now become visible -- an all or nothing proposition. If this is not working correctly, can you provide some sample code showing the problem? I refactored our code and the commit/rollback is now working. Thanks for pointing this out! I had mistakenly assumed that AcknowledgementMode.Transactional only worked for consumers (and not producers). It doesn't seem intuitive to me, that you would set something called AcknowledgementMode when producing messages. It makes sense when consuming them, yes, I got it, and I'm letting you know. But what do I acknowledge when sending a message? The naming conventions are not as clear as they could be, but at least it's working now! Thanks, Bryan
Re: Transactional Send Messages (NMS)
That sounds like a bug. My understanding of how sessions work is if you have set the AcknowledgementMode.Transactional, none of the messages that you send to producers created on that session will be visible to any consumers until the Commit() function is called. At that point, all messages sent up to that point will now become visible -- an all or nothing proposition. If this is not working correctly, can you provide some sample code showing the problem? Thanks, Jim On Tue, Feb 3, 2009 at 8:56 AM, Bryan Murphy bmurphy1...@gmail.com wrote: Essentially two phase commit. We keep running into the problem where our message are handled before the producer can commit it's transaction to the database, therefore the consumer does not see the correct data. We currently work around this by either putting a sleep delay at the beginning of the consumer (bad), or by sending the messages after the transaction commit (lots of extra buggy code), neither of which am I particularly happy with as a long term solution. Bryan On Thu, Jan 29, 2009 at 11:00 AM, Jim Gomes e.se...@gmail.com wrote: Hi Bryan, I'm not sure what you mean by participating inside a transaction. Are you talking about implementing a two-phase commit extended transaction operation? Or are you talking about using the transaction acknowledgment mode that is part of NMS? - Jim On Mon, Dec 29, 2008 at 3:02 PM, Bryan Murphy bmurphy1...@gmail.com wrote: Is there a way I can have the sending of messages to a message queue participate inside a transaction while using C# and NMS? Thanks, Bryan
Re: [Apache.NMS.ActiveMQ]using FailoverTransport
Thanks for the info on your test results. That's an important note about the failover uri syntax. I will use that info as I look into a separate report that the failover uri parsing is failing on Mono. On 1/31/09, wangchao wangchao8...@msn.com wrote: Thank you for your suggestion,semog. I tested the code again and found it's a wrong url.When I added the brackets arround the broker uri list(activemq:failover:(tcp://localhost:61616)),it ran correctly as described in the official document. If there's no broker running,the client application will blok;and when the broker start up,the client application will continue. The conclusion is that the broker uri list in failover transport must be bracketed even when there is only one uri. -- View this message in context: http://www.nabble.com/-Apache.NMS.ActiveMQ-using-FailoverTransport-tp21303879p21770271.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Configuring MarshallerFactory in .NET
Hi Doug, I'm not quite sure what your ultimate goal is, but your code looks like it is trying to configure the wire protocol to use OpenWire. If that is the case, you don't need all that advanced code. You can use the NMSConnectionFactory object and pass in a URI string that configures your wireformat, and several other connection and session settings. If you would like some links to documentation on URI parameter configuration, let me know. Otherwise let me know if I have misunderstood your intentions. Best, Jim On 1/31/09, dougly dmly@gmail.com wrote: Hi folks, I used the CSharpGeneratorTask to create the corresponding C# serializable classes along with a MarshallerFactory several classes to do the serialization. Now in my client code in .NET what do I need to do to configure the Marshallerfactory. IConnectionFactory fac = new ConnectionFactory(tcp://localhost:61616); using (IConnection conn = fac.CreateConnection()) { MarshallerFactory mfac = new MarshallerFactory(); ITransport itrans = ((Connection) conn).ITransport; if (itrans.GetType() == typeof(TcpTransport)) { Console.WriteLine(Marshaller added ...); TcpTransport trans = (TcpTransport) ((Connection)conn).ITransport; mfac.configure((OpenWireFormat) trans.Wireformat); } conn.Start(); ISession session = conn.CreateSession(); But I guess this is not going to work. Thanks guys Doug -- View this message in context: http://www.nabble.com/Configuring-MarshallerFactory-in-.NET-tp21771528p21771528.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: is ISession thread safe?
It looks like you have entered JIRA AMQNET-136 ( https://issues.apache.org/activemq/browse/AMQNET-136) for this problem. Thanks! - Jim On Wed, Jan 21, 2009 at 11:30 AM, sbs1982 satyajit.sa...@sac.com wrote: ++ MSDN talking about lock(this) http://msdn.microsoft.com/en-us/library/c5kehkcz(VS.80).aspxhttp://msdn.microsoft.com/en-us/library/c5kehkcz%28VS.80%29.aspx lock (this) is a problem if the instance can be accessed publicly. I see lock(this) used heavily in MessageConsumer class the consumer will be accessible to the main app as well. DEADLOCK SCENARIO: the deadlock occurs on close method of IMessageConsumer. Here is the scenario... Lets say we have the class below. The producer is calling the MessgeConsumers callback method. In this case its onMessage() method. Now lets assume there are 30K messages to be received in the call back. When we are on the 10th message and the user closes the trace Window the CloseWindow() method is called and the application stalls at the message consumers close method. Hope I am clear enough. Class TraceWindow { private IMessageConsumer consumerTrace = null; TraceWindow(Apache.NMS.IMessageConsumer iMessageConsumer) { this.consumerTrace = iMessageConsumer; if (consumerTrace != null) { this.consumerTrace.Listener += new MessageListener(OnMessage); } } public void OnMessage(Apache.NMS.IMessage bMsg) { //inserts in WPF ObservableCollection handleMessageDelegate Updater = new handleMessageDelegate(handleMessage); this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Input, Updater, obj); } public void handleMessage(Object item) { lock (collectionTrace) { { collectionTrace.Add(item); LogManager.GetLogger(AlgoSystemCommunicatorLogger).Info(item); } } } public void CloseWindow() { consumerTrace.Close(); //SYSTEM STALLS ON THIS CALL } }//end of class +++ Timothy Bish wrote: On Wed, 2009-01-21 at 10:26 -0800, sbs1982 wrote: If one thread in my app is trying to create a temporary topic and I already have a few consumers(listening on other temp topics processesing incoming messages on their respective call back methods i.e listeners) open. Now trying to call the close method of one of these consumers causes my app to go into deadlock. Can you create a test case that might reproduce the problem? If you run in the debugger can you pinpoint where the deadlock is occurring? is there some know issue of close method of consumers locking? I looked at the code in the MessageConsumer..the first statement is lock(this). Some articles are out there saying that locking on this is unsafe? Can you provide references, I'd like to read up on this (no pun intended). You may want to create a Jira issue to cover this problem. Regards Tim. -- Tim Bish http://fusesource.com http://timbish.blogspot.com/ -- View this message in context: http://www.nabble.com/is-ISession-thread-safe--tp21589189p21590482.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMS and non-responsive queue
Check your producer settings. The producer may override the message setting. Think of this as a persistent producer or non-persistent producer. Whatever message is sent via a persistent producer, that message will be flagged as persistent. I seem to remember coming across this a while back, but would need to re-investigate it. On Fri, Jan 30, 2009 at 7:03 AM, mkeenan kee...@p2sol.com wrote: semog wrote: consumer situation. If the messages are flagged as non-persistent, then everything works fine. We are still working on narrowing down the problem. I'm having the same problem as the OP, so we put a workaround in our production system. However, I am interested in pursuing the non-persistent option but am having problems. I am using Spring.NET, but I don't think the issue is in that code. In my log file I can see that a message with Persistent=False was sent by a message producer: [2009-01-30 08:45:25,541] [12] [DEBUG] [NmsTemplate] Sending created message [ActiveMQTextMessage[ ProducerId= Destination= TransactionId= OriginalDestination= MessageId= OriginalTransactionId= GroupID= GroupSequence=0 CorrelationId= Persistent=False Expiration=0 Priority=0 ReplyTo= Timestamp=0 Type= Content=System.Byte[] MarshalledProperties= DataStructure= TargetConsumerId= Compressed=False RedeliveryCounter=0 BrokerPath= Arrival=0 UserID= RecievedByDFBridge=False Droppable=False ] Text=message # 0001] In the JMX console, if I use the browseAsTable() method I see JMSDeliveryMode is PERSISTENT. I have confirmed this is the case by stopping and restarting the broker-- the message is still on the queue. Is it possible I have a setting in the broker that forces all messages to persist? I thought it was a per-message setting only. I'm using Transactional acknowledgment mode, if that makes a difference. Thanks for any hints! -- View this message in context: http://www.nabble.com/NMS-and-non-responsive-queue-tp21692908p21748760.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: NMS and non-responsive queue
Great! Glad I was able to help. I was once mystified by the same thing. I think I made some changes inside NMS to handle this in a more coherent fashion. It didn't make sense that a message flagged as non-persistent was being sent as persistent. Like I said, I would have to go and check the code to remind myself as to how exactly I made the change. It might have been in my own client code in my applications rather than in NMS itself. It's been a while... Best, Jim On Fri, Jan 30, 2009 at 9:48 AM, mkeenan kee...@p2sol.com wrote: semog wrote: Check your producer settings. The producer may override the message setting. Think of this as a persistent producer or non-persistent producer. Thank you, that was it. For anyone using Spring.NET, please note that the [B]Persistent[/B] property on the [B]NmsTemplate[/B] class defaults to true and if you set it to false you [B]MUST[/B] also set [B]ExplicitQosEnabled[/B] to true (default is False) in order for your persistence setting to be used. Otherwise it will be ignored. -- View this message in context: http://www.nabble.com/NMS-and-non-responsive-queue-tp21692908p21752228.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: xmpp broken ?
I have and am using Pidgeon to successfully connect to ActiveMQ XMPP protocol. I use the Pidgeon IM client to get notified of our Hudson builds. Hudson publishes via Jabber API to ActiveMQ, and then my Pidgeon client sees the message. It wasn't too difficult. I am currently using the 5.3 snapshot, but I started on the 5.2.0 version of ActiveMQ. On Fri, Jan 30, 2009 at 10:17 AM, Dave Cramer da...@postgresintl.comwrote: Bill, Yes, the xmpp connector starts. When I try connecting it just hangs. When I try a small client app it just hangs on the send as well. Dave Bill Schuller wrote: Are you including the optional XMPP jar? On 1/30/09 5:08 AM, Dave Cramer da...@postgresintl.com wrote: I've tried Adium, spark, iChat. None of them will connect. I even tried writing a simple publish/subscribe in java. Same problem. Does xmpp work ? --- Bill Schuller, Service Foundations Engineering, Intuit Inc. -- View this message in context: http://www.nabble.com/xmpp-broken---tp21745261p21752769.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Error writing to broker. Transport connection is closed.
I've never worked with ActiveMQ 4.1 series. I would only be able to try this against the 5.1.0 or higher version. I tend to stay with the latest version of ActiveMQ. This issue would need to be narrowed down to whether it is a client or broker issue. Could you try this test against ActiveMQ 5.2.0? If it still fails with that version, it is most likely an NMS issue. On Thu, Jan 8, 2009 at 1:46 AM, anujjain anujjain1...@gmail.com wrote: Hi, I new to ActiveMQ. I trying to build a .NET client by using NMS 1.1 for ActiveMQ 4.1.1. I wrote a simple publisher program by sending two messages. I worked fine then but if I give a Sleep time of 6(1 min). First message is sent fine, butbefore sending the second message I am getting following error: System.InvalidOperationException: Error writing to broker. Transport connection is closed. at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.Oneway(Command command) : Transport connection error: Error writing to broker. Transport connection is closed. I did the same exercise with Java API, and it was working fine. Following is the exact code in C# const string TOPIC_NAME = SampleSubscriptionTopic; const string BROKER = tcp://localhost:61616; const string CLIENT_ID = ActiveMqFirstSubscriber1; const string CONSUMER_ID = ActiveMqFirstSubscriber1; static void Main(string[] args) { IConnectionFactory factory = new ConnectionFactory(BROKER); IConnection con = factory.CreateConnection(); con.Start(); ISession sess = con.CreateSession(); ActiveMQTopic topic = new ActiveMQTopic(TOPIC_NAME); IMessageProducer prod = sess.CreateProducer(topic); for (int i = 0; i 2; i++) { ActiveMQTextMessage message = new ActiveMQTextMessage(this is from C# client + i); prod.Send(message); Console.WriteLine(Message number +i+ send); Thread.Sleep(6); } } catch (Exception ex) { Console.WriteLine(ex); Console.WriteLine(Press any key to exit...); Console.ReadKey(); } } Can any one please suggest me what is missing in the above code? -- View this message in context: http://www.nabble.com/Error-writing-to-broker.--Transport-connection-is-closed.-tp21348706p21348706.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.