You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by appi03 <ar...@sparta.com> on 2007/10/23 17:52:52 UTC

Help

I started learning activemq-cpp about a week ago. Right now I feel like i
haven't gotten anywhere. I wonder why? There is no solid documentation on
anything so to the new user, it's pretty confusing. 

Anyhow, I will stop my complaints. but, i need some serious help.

I just want to set up two computers; one producing messages and the other
one consuming messages. Now, do I need to run an activemq broker on both
computers? I believe the answer is no. So then, does anyone have an example
that I can look at to use it in this scenario.

If i need to run a broker on both machines, is that embedded broker? in that
case does anyone have a configuration example for that as well? 

Also, when I run the producer and consumer application. How do i configure
the connection factory? I have looked and I guess i am just tired of looking
now because i haven't found any pages on connection factory. I am not sure
how all that ties in together. 

Please help. So i can move on to bigger and better things like persistence.
I have something running right now but it just doesn't make sense anymore. 

help would be appreciated.
-- 
View this message in context: http://www.nabble.com/Help-tf4678118s2354.html#a13366380
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Help

Posted by appi03 <ar...@sparta.com>.
So anyhow, I finally got it working so that now I can see the messages on the
consumer side with only one broker running. That is what I wanted.

Thanks for your help.

Now i am on to the persistence option. I have a question about that. I am
using the cpp client.

I am setting persistent = true in the broker configuration. I also have
deliverymode set to PERSISTENT on the producer side. I am using topics. So i
have created a durable consumer . does that seem like I am on the right
path. 

Also, what does the persistenceAdapter do? is it where the messages are
stored? is there a limit on how much can you store in there? 



tabish121 wrote:
> 
> See this article 
> http://activemq.apache.org/networks-of-brokers.html
> 
> On Tue, 2007-10-23 at 10:36 -0700, appi03 wrote:
>> No i am using topics. 
>> 
>> Another question regarding the broker configuration. I know transport
>> connector is tcp://localhost:61616 but what goes in the network
>> connector?
>> 
>> 
>> 
>> tabish121 wrote:
>> > 
>> > Are you using Topics, or Queues?   If you are using Queues and happen
>> to
>> > have another consumer running on that queue then it could explain why
>> > you see only half the messages.
>> > 
>> > See this FAQ entry
>> > http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html
>> > 
>> > Regards
>> > Tim
>> > 
>> > On Tue, 2007-10-23 at 10:25 -0700, appi03 wrote:
>> >> Thanks for the reply.
>> >> 
>> >> I just couldn't get all the messages on the consumer side so I thought
>> >> something might be wrong in my configuration. Let me try this again
>> and
>> >> see
>> >> what happens, I know I had it working before.
>> >> 
>> >> It's so weird, i get exactly half of the messages produced. It's
>> almost
>> >> like
>> >> someone else is consuming the other half.
>> >> 
>> >> 
>> >> 
>> >> 
>> >> tabish121 wrote:
>> >> > 
>> >> > You don't need to run two brokers to have a producer and consumer
>> one
>> >> > different machines.  Is there a reason you are doing that?
>> >> > 
>> >> > All you really need is one broker and then point the uri of each two
>> >> > that broker.  So for instance if the broker is on a box whose IP is
>> >> > 172.21.46.3 then the broker URI would look like this.
>> >> > 
>> >> >     std::string brokerURI = "tcp://172.21.46.3:61616";
>> >> > 
>> >> > You don't need the explicit wireFormat option for openwire as its
>> the
>> >> > default.  If you do something like this in both the consumer and
>> >> > producer client code, then they should both connect to the same
>> broker.
>> >> > Then run your tests and see what happens.
>> >> > 
>> >> > Regards
>> >> > Tim.
>> >> > 
>> >> > On Tue, 2007-10-23 at 10:11 -0700, appi03 wrote:
>> >> >> Here is what I have so far. Btw, I am using activemq-cpp 
>> >> >> 
>> >> >> Producer Broker:
>> >> >>   
>> >> >>     <transportConnectors>
>> >> >>       <transportConnector name="openwire"
>> uri="tcp://localhost:61616"
>> >> />  
>> >> >>       <transportConnector name="ssl"    
>> uri="ssl://localhost:61617"/>
>> >> >>       <transportConnector name="stomp"  
>> >> uri="stomp://localhost:61613"/>
>> >> >>     </transportConnectors>
>> >> >> 
>> >> >>     <networkConnectors>
>> >> >>            <networkConnector name="host1"
>> >> >> uri="static://(tcp://157.185.37.184:61616)" /> 
>> >> >>     </networkConnectors>
>> >> >> 
>> >> >> Producer App (This is what goes into my connection factory):
>> >> >> 
>> >> >>     std::string brokerURI =
>> >> >>         "tcp://localhost:61616"
>> >> >> 		"?wireFormat=openwire";
>> >> >> 
>> >> >> 
>> >> >> Consumer Broker:
>> >> >> </persistenceAdapter>
>> >> >>   
>> >> >>     <transportConnectors>
>> >> >>       <transportConnector name="openwire"
>> uri="tcp://localhost:61616"
>> >> />  
>> >> >>       <transportConnector name="ssl"    
>> uri="ssl://localhost:61617"/>
>> >> >>       <transportConnector name="stomp"  
>> >> uri="stomp://localhost:61613"/>
>> >> >>     </transportConnectors>
>> >> >> 
>> >> >>     <networkConnectors>
>> >> >>      
>> >> >>       <networkConnector name="host1"
>> >> >> uri="static://(tcp://157.185.37.131:61616)" /> 
>> >> >> 
>> >> >>     </networkConnectors>
>> >> >> 
>> >> >> Consumer App (This is what goes into my connection factory):
>> >> >> 
>> >> >>     std::string brokerURI =
>> >> >>         "tcp://localhost:61616"
>> >> >> 		"?wireFormat=openwire";
>> >> >> 
>> >> >> I guess the first question would be; am I configuring them right?
>> Is
>> >> >> there a
>> >> >> better way of doing this?
>> >> >> 
>> >> >> Currently with this configuration I can consume messages but only
>> half
>> >> of
>> >> >> them. I am not sure why. 
>> >> >> 
>> >> >> Thanks for the help in advance. 
>> >> >> 
>> >> >> 
>> >> >> tabish121 wrote:
>> >> >> > 
>> >> >> > Can you tell us a little about what you are doing, possible
>> posting
>> >> >> some
>> >> >> > code showing your producer and consumer.
>> >> >> > 
>> >> >> > One thing to keep in mind is that unless you are using a
>> retroactive
>> >> >> > consumer your producer shouldn't start producing until you've
>> >> started
>> >> >> > your consumer.  
>> >> >> > 
>> >> >> > If you have specific questions that you need help with please
>> ask,
>> >> we
>> >> >> > try and answer them as quickly as possible.
>> >> >> > 
>> >> >> > Documentation like anything else on this project grows faster
>> when
>> >> >> > people participate and contribute.  Feel free to jump in.
>> >> >> > 
>> >> >> > Regards
>> >> >> > Tim.
>> >> >> > 
>> >> >> > On Tue, 2007-10-23 at 09:27 -0700, appi03 wrote:
>> >> >> >> Hey thanks for that example.
>> >> >> >> 
>> >> >> >> How does your broker configuration look? Currently, i this is
>> what
>> >> I
>> >> >> have
>> >> >> >> on
>> >> >> >> both computers
>> >> >> >> 
>> >> >> >> <transportConnector name="openwire" uri="tcp://localhost:61616"
>> />
>> >> >> >> 
>> >> >> >>  <networkConnector name="host1"
>> >> >> >> uri="static://(tcp://157.185.37.184:61616)"
>> >> >> >> failover="true" dynamicOnly="true" networkTTL="2" /> 
>> >> >> >> 
>> >> >> >> But for some reason I am only receiving half of the messages. I
>> am
>> >> >> >> thinking
>> >> >> >> something might be wrong in the way I configure my broker.
>> >> >> >> 
>> >> >> >> 
>> >> >> >> 
>> >> >> >> OB40 wrote:
>> >> >> >> > 
>> >> >> >> > Hi,
>> >> >> >> > 
>> >> >> >> > You need only one broker on one of the computers. I have
>> learnt
>> >> most
>> >> >> of
>> >> >> >> > activemq-cpp from the online example which is decent
>> >> >> >> > (http://activemq.apache.org/cms/example.html). I am also
>> >> attaching a
>> >> >> >> > couple of noddies I wrote, one is a transmitter (producer) and
>> >> the
>> >> >> >> other
>> >> >> >> > is a consumer. I have built them on Ubuntu. To run them you
>> will
>> >> be
>> >> >> >> need
>> >> >> >> > to set you LD_LIBRARY_PATH to /usr/local/lib/ and to compile
>> them
>> >> >> you
>> >> >> >> will
>> >> >> >> > need to add /usr/local/include/activemq-cpp-2.1/ as the
>> include
>> >> path
>> >> >> in
>> >> >> >> > you g++ command.
>> >> >> >> > 
>> >> >> >> > Best of luck.
>> >> >> >> > 
>> >> >> >> > 
>> >> >> >> > appi03 wrote:
>> >> >> >> >> 
>> >> >> >> >> I started learning activemq-cpp about a week ago. Right now I
>> >> feel
>> >> >> >> like i
>> >> >> >> >> haven't gotten anywhere. I wonder why? There is no solid
>> >> >> documentation
>> >> >> >> on
>> >> >> >> >> anything so to the new user, it's pretty confusing. 
>> >> >> >> >> 
>> >> >> >> >> Anyhow, I will stop my complaints. but, i need some serious
>> >> help.
>> >> >> >> >> 
>> >> >> >> >> I just want to set up two computers; one producing messages
>> and
>> >> the
>> >> >> >> other
>> >> >> >> >> one consuming messages. Now, do I need to run an activemq
>> broker
>> >> on
>> >> >> >> both
>> >> >> >> >> computers? I believe the answer is no. So then, does anyone
>> have
>> >> an
>> >> >> >> >> example that I can look at to use it in this scenario.
>> >> >> >> >> 
>> >> >> >> >> If i need to run a broker on both machines, is that embedded
>> >> >> broker?
>> >> >> >> in
>> >> >> >> >> that case does anyone have a configuration example for that
>> as
>> >> >> well? 
>> >> >> >> >> 
>> >> >> >> >> Also, when I run the producer and consumer application. How
>> do i
>> >> >> >> >> configure the connection factory? I have looked and I guess i
>> am
>> >> >> just
>> >> >> >> >> tired of looking now because i haven't found any pages on
>> >> >> connection
>> >> >> >> >> factory. I am not sure how all that ties in together. 
>> >> >> >> >> 
>> >> >> >> >> Please help. So i can move on to bigger and better things
>> like
>> >> >> >> >> persistence. I have something running right now but it just
>> >> doesn't
>> >> >> >> make
>> >> >> >> >> sense anymore. 
>> >> >> >> >> 
>> >> >> >> >> help would be appreciated.
>> >> >> >> >> 
>> >> >> >> >  http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
>> >> >> >> > CppQueueReceiver.cpp 
>> >> >> >> > http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
>> >> >> >> > CppQueueTransmitter.cpp 
>> >> >> >> > 
>> >> >> >> 
>> >> >> > 
>> >> >> > 
>> >> >> 
>> >> > 
>> >> > 
>> >> 
>> > 
>> > 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Help-tf4678118s2354.html#a13371330
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Help

Posted by Timothy Bish <ti...@sensis.com>.
See this article 
http://activemq.apache.org/networks-of-brokers.html

On Tue, 2007-10-23 at 10:36 -0700, appi03 wrote:
> No i am using topics. 
> 
> Another question regarding the broker configuration. I know transport
> connector is tcp://localhost:61616 but what goes in the network connector?
> 
> 
> 
> tabish121 wrote:
> > 
> > Are you using Topics, or Queues?   If you are using Queues and happen to
> > have another consumer running on that queue then it could explain why
> > you see only half the messages.
> > 
> > See this FAQ entry
> > http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html
> > 
> > Regards
> > Tim
> > 
> > On Tue, 2007-10-23 at 10:25 -0700, appi03 wrote:
> >> Thanks for the reply.
> >> 
> >> I just couldn't get all the messages on the consumer side so I thought
> >> something might be wrong in my configuration. Let me try this again and
> >> see
> >> what happens, I know I had it working before.
> >> 
> >> It's so weird, i get exactly half of the messages produced. It's almost
> >> like
> >> someone else is consuming the other half.
> >> 
> >> 
> >> 
> >> 
> >> tabish121 wrote:
> >> > 
> >> > You don't need to run two brokers to have a producer and consumer one
> >> > different machines.  Is there a reason you are doing that?
> >> > 
> >> > All you really need is one broker and then point the uri of each two
> >> > that broker.  So for instance if the broker is on a box whose IP is
> >> > 172.21.46.3 then the broker URI would look like this.
> >> > 
> >> >     std::string brokerURI = "tcp://172.21.46.3:61616";
> >> > 
> >> > You don't need the explicit wireFormat option for openwire as its the
> >> > default.  If you do something like this in both the consumer and
> >> > producer client code, then they should both connect to the same broker.
> >> > Then run your tests and see what happens.
> >> > 
> >> > Regards
> >> > Tim.
> >> > 
> >> > On Tue, 2007-10-23 at 10:11 -0700, appi03 wrote:
> >> >> Here is what I have so far. Btw, I am using activemq-cpp 
> >> >> 
> >> >> Producer Broker:
> >> >>   
> >> >>     <transportConnectors>
> >> >>       <transportConnector name="openwire" uri="tcp://localhost:61616"
> >> />  
> >> >>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
> >> >>       <transportConnector name="stomp"  
> >> uri="stomp://localhost:61613"/>
> >> >>     </transportConnectors>
> >> >> 
> >> >>     <networkConnectors>
> >> >>            <networkConnector name="host1"
> >> >> uri="static://(tcp://157.185.37.184:61616)" /> 
> >> >>     </networkConnectors>
> >> >> 
> >> >> Producer App (This is what goes into my connection factory):
> >> >> 
> >> >>     std::string brokerURI =
> >> >>         "tcp://localhost:61616"
> >> >> 		"?wireFormat=openwire";
> >> >> 
> >> >> 
> >> >> Consumer Broker:
> >> >> </persistenceAdapter>
> >> >>   
> >> >>     <transportConnectors>
> >> >>       <transportConnector name="openwire" uri="tcp://localhost:61616"
> >> />  
> >> >>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
> >> >>       <transportConnector name="stomp"  
> >> uri="stomp://localhost:61613"/>
> >> >>     </transportConnectors>
> >> >> 
> >> >>     <networkConnectors>
> >> >>      
> >> >>       <networkConnector name="host1"
> >> >> uri="static://(tcp://157.185.37.131:61616)" /> 
> >> >> 
> >> >>     </networkConnectors>
> >> >> 
> >> >> Consumer App (This is what goes into my connection factory):
> >> >> 
> >> >>     std::string brokerURI =
> >> >>         "tcp://localhost:61616"
> >> >> 		"?wireFormat=openwire";
> >> >> 
> >> >> I guess the first question would be; am I configuring them right? Is
> >> >> there a
> >> >> better way of doing this?
> >> >> 
> >> >> Currently with this configuration I can consume messages but only half
> >> of
> >> >> them. I am not sure why. 
> >> >> 
> >> >> Thanks for the help in advance. 
> >> >> 
> >> >> 
> >> >> tabish121 wrote:
> >> >> > 
> >> >> > Can you tell us a little about what you are doing, possible posting
> >> >> some
> >> >> > code showing your producer and consumer.
> >> >> > 
> >> >> > One thing to keep in mind is that unless you are using a retroactive
> >> >> > consumer your producer shouldn't start producing until you've
> >> started
> >> >> > your consumer.  
> >> >> > 
> >> >> > If you have specific questions that you need help with please ask,
> >> we
> >> >> > try and answer them as quickly as possible.
> >> >> > 
> >> >> > Documentation like anything else on this project grows faster when
> >> >> > people participate and contribute.  Feel free to jump in.
> >> >> > 
> >> >> > Regards
> >> >> > Tim.
> >> >> > 
> >> >> > On Tue, 2007-10-23 at 09:27 -0700, appi03 wrote:
> >> >> >> Hey thanks for that example.
> >> >> >> 
> >> >> >> How does your broker configuration look? Currently, i this is what
> >> I
> >> >> have
> >> >> >> on
> >> >> >> both computers
> >> >> >> 
> >> >> >> <transportConnector name="openwire" uri="tcp://localhost:61616" />
> >> >> >> 
> >> >> >>  <networkConnector name="host1"
> >> >> >> uri="static://(tcp://157.185.37.184:61616)"
> >> >> >> failover="true" dynamicOnly="true" networkTTL="2" /> 
> >> >> >> 
> >> >> >> But for some reason I am only receiving half of the messages. I am
> >> >> >> thinking
> >> >> >> something might be wrong in the way I configure my broker.
> >> >> >> 
> >> >> >> 
> >> >> >> 
> >> >> >> OB40 wrote:
> >> >> >> > 
> >> >> >> > Hi,
> >> >> >> > 
> >> >> >> > You need only one broker on one of the computers. I have learnt
> >> most
> >> >> of
> >> >> >> > activemq-cpp from the online example which is decent
> >> >> >> > (http://activemq.apache.org/cms/example.html). I am also
> >> attaching a
> >> >> >> > couple of noddies I wrote, one is a transmitter (producer) and
> >> the
> >> >> >> other
> >> >> >> > is a consumer. I have built them on Ubuntu. To run them you will
> >> be
> >> >> >> need
> >> >> >> > to set you LD_LIBRARY_PATH to /usr/local/lib/ and to compile them
> >> >> you
> >> >> >> will
> >> >> >> > need to add /usr/local/include/activemq-cpp-2.1/ as the include
> >> path
> >> >> in
> >> >> >> > you g++ command.
> >> >> >> > 
> >> >> >> > Best of luck.
> >> >> >> > 
> >> >> >> > 
> >> >> >> > appi03 wrote:
> >> >> >> >> 
> >> >> >> >> I started learning activemq-cpp about a week ago. Right now I
> >> feel
> >> >> >> like i
> >> >> >> >> haven't gotten anywhere. I wonder why? There is no solid
> >> >> documentation
> >> >> >> on
> >> >> >> >> anything so to the new user, it's pretty confusing. 
> >> >> >> >> 
> >> >> >> >> Anyhow, I will stop my complaints. but, i need some serious
> >> help.
> >> >> >> >> 
> >> >> >> >> I just want to set up two computers; one producing messages and
> >> the
> >> >> >> other
> >> >> >> >> one consuming messages. Now, do I need to run an activemq broker
> >> on
> >> >> >> both
> >> >> >> >> computers? I believe the answer is no. So then, does anyone have
> >> an
> >> >> >> >> example that I can look at to use it in this scenario.
> >> >> >> >> 
> >> >> >> >> If i need to run a broker on both machines, is that embedded
> >> >> broker?
> >> >> >> in
> >> >> >> >> that case does anyone have a configuration example for that as
> >> >> well? 
> >> >> >> >> 
> >> >> >> >> Also, when I run the producer and consumer application. How do i
> >> >> >> >> configure the connection factory? I have looked and I guess i am
> >> >> just
> >> >> >> >> tired of looking now because i haven't found any pages on
> >> >> connection
> >> >> >> >> factory. I am not sure how all that ties in together. 
> >> >> >> >> 
> >> >> >> >> Please help. So i can move on to bigger and better things like
> >> >> >> >> persistence. I have something running right now but it just
> >> doesn't
> >> >> >> make
> >> >> >> >> sense anymore. 
> >> >> >> >> 
> >> >> >> >> help would be appreciated.
> >> >> >> >> 
> >> >> >> >  http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
> >> >> >> > CppQueueReceiver.cpp 
> >> >> >> > http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
> >> >> >> > CppQueueTransmitter.cpp 
> >> >> >> > 
> >> >> >> 
> >> >> > 
> >> >> > 
> >> >> 
> >> > 
> >> > 
> >> 
> > 
> > 
> 

Re: Help

Posted by appi03 <ar...@sparta.com>.
No i am using topics. 

Another question regarding the broker configuration. I know transport
connector is tcp://localhost:61616 but what goes in the network connector?



tabish121 wrote:
> 
> Are you using Topics, or Queues?   If you are using Queues and happen to
> have another consumer running on that queue then it could explain why
> you see only half the messages.
> 
> See this FAQ entry
> http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html
> 
> Regards
> Tim
> 
> On Tue, 2007-10-23 at 10:25 -0700, appi03 wrote:
>> Thanks for the reply.
>> 
>> I just couldn't get all the messages on the consumer side so I thought
>> something might be wrong in my configuration. Let me try this again and
>> see
>> what happens, I know I had it working before.
>> 
>> It's so weird, i get exactly half of the messages produced. It's almost
>> like
>> someone else is consuming the other half.
>> 
>> 
>> 
>> 
>> tabish121 wrote:
>> > 
>> > You don't need to run two brokers to have a producer and consumer one
>> > different machines.  Is there a reason you are doing that?
>> > 
>> > All you really need is one broker and then point the uri of each two
>> > that broker.  So for instance if the broker is on a box whose IP is
>> > 172.21.46.3 then the broker URI would look like this.
>> > 
>> >     std::string brokerURI = "tcp://172.21.46.3:61616";
>> > 
>> > You don't need the explicit wireFormat option for openwire as its the
>> > default.  If you do something like this in both the consumer and
>> > producer client code, then they should both connect to the same broker.
>> > Then run your tests and see what happens.
>> > 
>> > Regards
>> > Tim.
>> > 
>> > On Tue, 2007-10-23 at 10:11 -0700, appi03 wrote:
>> >> Here is what I have so far. Btw, I am using activemq-cpp 
>> >> 
>> >> Producer Broker:
>> >>   
>> >>     <transportConnectors>
>> >>       <transportConnector name="openwire" uri="tcp://localhost:61616"
>> />  
>> >>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>> >>       <transportConnector name="stomp"  
>> uri="stomp://localhost:61613"/>
>> >>     </transportConnectors>
>> >> 
>> >>     <networkConnectors>
>> >>            <networkConnector name="host1"
>> >> uri="static://(tcp://157.185.37.184:61616)" /> 
>> >>     </networkConnectors>
>> >> 
>> >> Producer App (This is what goes into my connection factory):
>> >> 
>> >>     std::string brokerURI =
>> >>         "tcp://localhost:61616"
>> >> 		"?wireFormat=openwire";
>> >> 
>> >> 
>> >> Consumer Broker:
>> >> </persistenceAdapter>
>> >>   
>> >>     <transportConnectors>
>> >>       <transportConnector name="openwire" uri="tcp://localhost:61616"
>> />  
>> >>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>> >>       <transportConnector name="stomp"  
>> uri="stomp://localhost:61613"/>
>> >>     </transportConnectors>
>> >> 
>> >>     <networkConnectors>
>> >>      
>> >>       <networkConnector name="host1"
>> >> uri="static://(tcp://157.185.37.131:61616)" /> 
>> >> 
>> >>     </networkConnectors>
>> >> 
>> >> Consumer App (This is what goes into my connection factory):
>> >> 
>> >>     std::string brokerURI =
>> >>         "tcp://localhost:61616"
>> >> 		"?wireFormat=openwire";
>> >> 
>> >> I guess the first question would be; am I configuring them right? Is
>> >> there a
>> >> better way of doing this?
>> >> 
>> >> Currently with this configuration I can consume messages but only half
>> of
>> >> them. I am not sure why. 
>> >> 
>> >> Thanks for the help in advance. 
>> >> 
>> >> 
>> >> tabish121 wrote:
>> >> > 
>> >> > Can you tell us a little about what you are doing, possible posting
>> >> some
>> >> > code showing your producer and consumer.
>> >> > 
>> >> > One thing to keep in mind is that unless you are using a retroactive
>> >> > consumer your producer shouldn't start producing until you've
>> started
>> >> > your consumer.  
>> >> > 
>> >> > If you have specific questions that you need help with please ask,
>> we
>> >> > try and answer them as quickly as possible.
>> >> > 
>> >> > Documentation like anything else on this project grows faster when
>> >> > people participate and contribute.  Feel free to jump in.
>> >> > 
>> >> > Regards
>> >> > Tim.
>> >> > 
>> >> > On Tue, 2007-10-23 at 09:27 -0700, appi03 wrote:
>> >> >> Hey thanks for that example.
>> >> >> 
>> >> >> How does your broker configuration look? Currently, i this is what
>> I
>> >> have
>> >> >> on
>> >> >> both computers
>> >> >> 
>> >> >> <transportConnector name="openwire" uri="tcp://localhost:61616" />
>> >> >> 
>> >> >>  <networkConnector name="host1"
>> >> >> uri="static://(tcp://157.185.37.184:61616)"
>> >> >> failover="true" dynamicOnly="true" networkTTL="2" /> 
>> >> >> 
>> >> >> But for some reason I am only receiving half of the messages. I am
>> >> >> thinking
>> >> >> something might be wrong in the way I configure my broker.
>> >> >> 
>> >> >> 
>> >> >> 
>> >> >> OB40 wrote:
>> >> >> > 
>> >> >> > Hi,
>> >> >> > 
>> >> >> > You need only one broker on one of the computers. I have learnt
>> most
>> >> of
>> >> >> > activemq-cpp from the online example which is decent
>> >> >> > (http://activemq.apache.org/cms/example.html). I am also
>> attaching a
>> >> >> > couple of noddies I wrote, one is a transmitter (producer) and
>> the
>> >> >> other
>> >> >> > is a consumer. I have built them on Ubuntu. To run them you will
>> be
>> >> >> need
>> >> >> > to set you LD_LIBRARY_PATH to /usr/local/lib/ and to compile them
>> >> you
>> >> >> will
>> >> >> > need to add /usr/local/include/activemq-cpp-2.1/ as the include
>> path
>> >> in
>> >> >> > you g++ command.
>> >> >> > 
>> >> >> > Best of luck.
>> >> >> > 
>> >> >> > 
>> >> >> > appi03 wrote:
>> >> >> >> 
>> >> >> >> I started learning activemq-cpp about a week ago. Right now I
>> feel
>> >> >> like i
>> >> >> >> haven't gotten anywhere. I wonder why? There is no solid
>> >> documentation
>> >> >> on
>> >> >> >> anything so to the new user, it's pretty confusing. 
>> >> >> >> 
>> >> >> >> Anyhow, I will stop my complaints. but, i need some serious
>> help.
>> >> >> >> 
>> >> >> >> I just want to set up two computers; one producing messages and
>> the
>> >> >> other
>> >> >> >> one consuming messages. Now, do I need to run an activemq broker
>> on
>> >> >> both
>> >> >> >> computers? I believe the answer is no. So then, does anyone have
>> an
>> >> >> >> example that I can look at to use it in this scenario.
>> >> >> >> 
>> >> >> >> If i need to run a broker on both machines, is that embedded
>> >> broker?
>> >> >> in
>> >> >> >> that case does anyone have a configuration example for that as
>> >> well? 
>> >> >> >> 
>> >> >> >> Also, when I run the producer and consumer application. How do i
>> >> >> >> configure the connection factory? I have looked and I guess i am
>> >> just
>> >> >> >> tired of looking now because i haven't found any pages on
>> >> connection
>> >> >> >> factory. I am not sure how all that ties in together. 
>> >> >> >> 
>> >> >> >> Please help. So i can move on to bigger and better things like
>> >> >> >> persistence. I have something running right now but it just
>> doesn't
>> >> >> make
>> >> >> >> sense anymore. 
>> >> >> >> 
>> >> >> >> help would be appreciated.
>> >> >> >> 
>> >> >> >  http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
>> >> >> > CppQueueReceiver.cpp 
>> >> >> > http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
>> >> >> > CppQueueTransmitter.cpp 
>> >> >> > 
>> >> >> 
>> >> > 
>> >> > 
>> >> 
>> > 
>> > 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Help-tf4678118s2354.html#a13369796
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Help

Posted by Timothy Bish <ti...@sensis.com>.
Are you using Topics, or Queues?   If you are using Queues and happen to
have another consumer running on that queue then it could explain why
you see only half the messages.

See this FAQ entry
http://activemq.apache.org/how-does-a-queue-compare-to-a-topic.html

Regards
Tim

On Tue, 2007-10-23 at 10:25 -0700, appi03 wrote:
> Thanks for the reply.
> 
> I just couldn't get all the messages on the consumer side so I thought
> something might be wrong in my configuration. Let me try this again and see
> what happens, I know I had it working before.
> 
> It's so weird, i get exactly half of the messages produced. It's almost like
> someone else is consuming the other half.
> 
> 
> 
> 
> tabish121 wrote:
> > 
> > You don't need to run two brokers to have a producer and consumer one
> > different machines.  Is there a reason you are doing that?
> > 
> > All you really need is one broker and then point the uri of each two
> > that broker.  So for instance if the broker is on a box whose IP is
> > 172.21.46.3 then the broker URI would look like this.
> > 
> >     std::string brokerURI = "tcp://172.21.46.3:61616";
> > 
> > You don't need the explicit wireFormat option for openwire as its the
> > default.  If you do something like this in both the consumer and
> > producer client code, then they should both connect to the same broker.
> > Then run your tests and see what happens.
> > 
> > Regards
> > Tim.
> > 
> > On Tue, 2007-10-23 at 10:11 -0700, appi03 wrote:
> >> Here is what I have so far. Btw, I am using activemq-cpp 
> >> 
> >> Producer Broker:
> >>   
> >>     <transportConnectors>
> >>       <transportConnector name="openwire" uri="tcp://localhost:61616" />  
> >>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
> >>       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
> >>     </transportConnectors>
> >> 
> >>     <networkConnectors>
> >>            <networkConnector name="host1"
> >> uri="static://(tcp://157.185.37.184:61616)" /> 
> >>     </networkConnectors>
> >> 
> >> Producer App (This is what goes into my connection factory):
> >> 
> >>     std::string brokerURI =
> >>         "tcp://localhost:61616"
> >> 		"?wireFormat=openwire";
> >> 
> >> 
> >> Consumer Broker:
> >> </persistenceAdapter>
> >>   
> >>     <transportConnectors>
> >>       <transportConnector name="openwire" uri="tcp://localhost:61616" />  
> >>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
> >>       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
> >>     </transportConnectors>
> >> 
> >>     <networkConnectors>
> >>      
> >>       <networkConnector name="host1"
> >> uri="static://(tcp://157.185.37.131:61616)" /> 
> >> 
> >>     </networkConnectors>
> >> 
> >> Consumer App (This is what goes into my connection factory):
> >> 
> >>     std::string brokerURI =
> >>         "tcp://localhost:61616"
> >> 		"?wireFormat=openwire";
> >> 
> >> I guess the first question would be; am I configuring them right? Is
> >> there a
> >> better way of doing this?
> >> 
> >> Currently with this configuration I can consume messages but only half of
> >> them. I am not sure why. 
> >> 
> >> Thanks for the help in advance. 
> >> 
> >> 
> >> tabish121 wrote:
> >> > 
> >> > Can you tell us a little about what you are doing, possible posting
> >> some
> >> > code showing your producer and consumer.
> >> > 
> >> > One thing to keep in mind is that unless you are using a retroactive
> >> > consumer your producer shouldn't start producing until you've started
> >> > your consumer.  
> >> > 
> >> > If you have specific questions that you need help with please ask, we
> >> > try and answer them as quickly as possible.
> >> > 
> >> > Documentation like anything else on this project grows faster when
> >> > people participate and contribute.  Feel free to jump in.
> >> > 
> >> > Regards
> >> > Tim.
> >> > 
> >> > On Tue, 2007-10-23 at 09:27 -0700, appi03 wrote:
> >> >> Hey thanks for that example.
> >> >> 
> >> >> How does your broker configuration look? Currently, i this is what I
> >> have
> >> >> on
> >> >> both computers
> >> >> 
> >> >> <transportConnector name="openwire" uri="tcp://localhost:61616" />
> >> >> 
> >> >>  <networkConnector name="host1"
> >> >> uri="static://(tcp://157.185.37.184:61616)"
> >> >> failover="true" dynamicOnly="true" networkTTL="2" /> 
> >> >> 
> >> >> But for some reason I am only receiving half of the messages. I am
> >> >> thinking
> >> >> something might be wrong in the way I configure my broker.
> >> >> 
> >> >> 
> >> >> 
> >> >> OB40 wrote:
> >> >> > 
> >> >> > Hi,
> >> >> > 
> >> >> > You need only one broker on one of the computers. I have learnt most
> >> of
> >> >> > activemq-cpp from the online example which is decent
> >> >> > (http://activemq.apache.org/cms/example.html). I am also attaching a
> >> >> > couple of noddies I wrote, one is a transmitter (producer) and the
> >> >> other
> >> >> > is a consumer. I have built them on Ubuntu. To run them you will be
> >> >> need
> >> >> > to set you LD_LIBRARY_PATH to /usr/local/lib/ and to compile them
> >> you
> >> >> will
> >> >> > need to add /usr/local/include/activemq-cpp-2.1/ as the include path
> >> in
> >> >> > you g++ command.
> >> >> > 
> >> >> > Best of luck.
> >> >> > 
> >> >> > 
> >> >> > appi03 wrote:
> >> >> >> 
> >> >> >> I started learning activemq-cpp about a week ago. Right now I feel
> >> >> like i
> >> >> >> haven't gotten anywhere. I wonder why? There is no solid
> >> documentation
> >> >> on
> >> >> >> anything so to the new user, it's pretty confusing. 
> >> >> >> 
> >> >> >> Anyhow, I will stop my complaints. but, i need some serious help.
> >> >> >> 
> >> >> >> I just want to set up two computers; one producing messages and the
> >> >> other
> >> >> >> one consuming messages. Now, do I need to run an activemq broker on
> >> >> both
> >> >> >> computers? I believe the answer is no. So then, does anyone have an
> >> >> >> example that I can look at to use it in this scenario.
> >> >> >> 
> >> >> >> If i need to run a broker on both machines, is that embedded
> >> broker?
> >> >> in
> >> >> >> that case does anyone have a configuration example for that as
> >> well? 
> >> >> >> 
> >> >> >> Also, when I run the producer and consumer application. How do i
> >> >> >> configure the connection factory? I have looked and I guess i am
> >> just
> >> >> >> tired of looking now because i haven't found any pages on
> >> connection
> >> >> >> factory. I am not sure how all that ties in together. 
> >> >> >> 
> >> >> >> Please help. So i can move on to bigger and better things like
> >> >> >> persistence. I have something running right now but it just doesn't
> >> >> make
> >> >> >> sense anymore. 
> >> >> >> 
> >> >> >> help would be appreciated.
> >> >> >> 
> >> >> >  http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
> >> >> > CppQueueReceiver.cpp 
> >> >> > http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
> >> >> > CppQueueTransmitter.cpp 
> >> >> > 
> >> >> 
> >> > 
> >> > 
> >> 
> > 
> > 
> 

Re: Help

Posted by appi03 <ar...@sparta.com>.
Thanks for the reply.

I just couldn't get all the messages on the consumer side so I thought
something might be wrong in my configuration. Let me try this again and see
what happens, I know I had it working before.

It's so weird, i get exactly half of the messages produced. It's almost like
someone else is consuming the other half.




tabish121 wrote:
> 
> You don't need to run two brokers to have a producer and consumer one
> different machines.  Is there a reason you are doing that?
> 
> All you really need is one broker and then point the uri of each two
> that broker.  So for instance if the broker is on a box whose IP is
> 172.21.46.3 then the broker URI would look like this.
> 
>     std::string brokerURI = "tcp://172.21.46.3:61616";
> 
> You don't need the explicit wireFormat option for openwire as its the
> default.  If you do something like this in both the consumer and
> producer client code, then they should both connect to the same broker.
> Then run your tests and see what happens.
> 
> Regards
> Tim.
> 
> On Tue, 2007-10-23 at 10:11 -0700, appi03 wrote:
>> Here is what I have so far. Btw, I am using activemq-cpp 
>> 
>> Producer Broker:
>>   
>>     <transportConnectors>
>>       <transportConnector name="openwire" uri="tcp://localhost:61616" />  
>>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>>       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>>     </transportConnectors>
>> 
>>     <networkConnectors>
>>            <networkConnector name="host1"
>> uri="static://(tcp://157.185.37.184:61616)" /> 
>>     </networkConnectors>
>> 
>> Producer App (This is what goes into my connection factory):
>> 
>>     std::string brokerURI =
>>         "tcp://localhost:61616"
>> 		"?wireFormat=openwire";
>> 
>> 
>> Consumer Broker:
>> </persistenceAdapter>
>>   
>>     <transportConnectors>
>>       <transportConnector name="openwire" uri="tcp://localhost:61616" />  
>>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>>       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>>     </transportConnectors>
>> 
>>     <networkConnectors>
>>      
>>       <networkConnector name="host1"
>> uri="static://(tcp://157.185.37.131:61616)" /> 
>> 
>>     </networkConnectors>
>> 
>> Consumer App (This is what goes into my connection factory):
>> 
>>     std::string brokerURI =
>>         "tcp://localhost:61616"
>> 		"?wireFormat=openwire";
>> 
>> I guess the first question would be; am I configuring them right? Is
>> there a
>> better way of doing this?
>> 
>> Currently with this configuration I can consume messages but only half of
>> them. I am not sure why. 
>> 
>> Thanks for the help in advance. 
>> 
>> 
>> tabish121 wrote:
>> > 
>> > Can you tell us a little about what you are doing, possible posting
>> some
>> > code showing your producer and consumer.
>> > 
>> > One thing to keep in mind is that unless you are using a retroactive
>> > consumer your producer shouldn't start producing until you've started
>> > your consumer.  
>> > 
>> > If you have specific questions that you need help with please ask, we
>> > try and answer them as quickly as possible.
>> > 
>> > Documentation like anything else on this project grows faster when
>> > people participate and contribute.  Feel free to jump in.
>> > 
>> > Regards
>> > Tim.
>> > 
>> > On Tue, 2007-10-23 at 09:27 -0700, appi03 wrote:
>> >> Hey thanks for that example.
>> >> 
>> >> How does your broker configuration look? Currently, i this is what I
>> have
>> >> on
>> >> both computers
>> >> 
>> >> <transportConnector name="openwire" uri="tcp://localhost:61616" />
>> >> 
>> >>  <networkConnector name="host1"
>> >> uri="static://(tcp://157.185.37.184:61616)"
>> >> failover="true" dynamicOnly="true" networkTTL="2" /> 
>> >> 
>> >> But for some reason I am only receiving half of the messages. I am
>> >> thinking
>> >> something might be wrong in the way I configure my broker.
>> >> 
>> >> 
>> >> 
>> >> OB40 wrote:
>> >> > 
>> >> > Hi,
>> >> > 
>> >> > You need only one broker on one of the computers. I have learnt most
>> of
>> >> > activemq-cpp from the online example which is decent
>> >> > (http://activemq.apache.org/cms/example.html). I am also attaching a
>> >> > couple of noddies I wrote, one is a transmitter (producer) and the
>> >> other
>> >> > is a consumer. I have built them on Ubuntu. To run them you will be
>> >> need
>> >> > to set you LD_LIBRARY_PATH to /usr/local/lib/ and to compile them
>> you
>> >> will
>> >> > need to add /usr/local/include/activemq-cpp-2.1/ as the include path
>> in
>> >> > you g++ command.
>> >> > 
>> >> > Best of luck.
>> >> > 
>> >> > 
>> >> > appi03 wrote:
>> >> >> 
>> >> >> I started learning activemq-cpp about a week ago. Right now I feel
>> >> like i
>> >> >> haven't gotten anywhere. I wonder why? There is no solid
>> documentation
>> >> on
>> >> >> anything so to the new user, it's pretty confusing. 
>> >> >> 
>> >> >> Anyhow, I will stop my complaints. but, i need some serious help.
>> >> >> 
>> >> >> I just want to set up two computers; one producing messages and the
>> >> other
>> >> >> one consuming messages. Now, do I need to run an activemq broker on
>> >> both
>> >> >> computers? I believe the answer is no. So then, does anyone have an
>> >> >> example that I can look at to use it in this scenario.
>> >> >> 
>> >> >> If i need to run a broker on both machines, is that embedded
>> broker?
>> >> in
>> >> >> that case does anyone have a configuration example for that as
>> well? 
>> >> >> 
>> >> >> Also, when I run the producer and consumer application. How do i
>> >> >> configure the connection factory? I have looked and I guess i am
>> just
>> >> >> tired of looking now because i haven't found any pages on
>> connection
>> >> >> factory. I am not sure how all that ties in together. 
>> >> >> 
>> >> >> Please help. So i can move on to bigger and better things like
>> >> >> persistence. I have something running right now but it just doesn't
>> >> make
>> >> >> sense anymore. 
>> >> >> 
>> >> >> help would be appreciated.
>> >> >> 
>> >> >  http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
>> >> > CppQueueReceiver.cpp 
>> >> > http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
>> >> > CppQueueTransmitter.cpp 
>> >> > 
>> >> 
>> > 
>> > 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Help-tf4678118s2354.html#a13369471
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Help

Posted by Timothy Bish <ti...@sensis.com>.
You don't need to run two brokers to have a producer and consumer one
different machines.  Is there a reason you are doing that?

All you really need is one broker and then point the uri of each two
that broker.  So for instance if the broker is on a box whose IP is
172.21.46.3 then the broker URI would look like this.

    std::string brokerURI = "tcp://172.21.46.3:61616";

You don't need the explicit wireFormat option for openwire as its the
default.  If you do something like this in both the consumer and
producer client code, then they should both connect to the same broker.
Then run your tests and see what happens.

Regards
Tim.

On Tue, 2007-10-23 at 10:11 -0700, appi03 wrote:
> Here is what I have so far. Btw, I am using activemq-cpp 
> 
> Producer Broker:
>   
>     <transportConnectors>
>       <transportConnector name="openwire" uri="tcp://localhost:61616" />  
>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>     </transportConnectors>
> 
>     <networkConnectors>
>            <networkConnector name="host1"
> uri="static://(tcp://157.185.37.184:61616)" /> 
>     </networkConnectors>
> 
> Producer App (This is what goes into my connection factory):
> 
>     std::string brokerURI =
>         "tcp://localhost:61616"
> 		"?wireFormat=openwire";
> 
> 
> Consumer Broker:
> </persistenceAdapter>
>   
>     <transportConnectors>
>       <transportConnector name="openwire" uri="tcp://localhost:61616" />  
>       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>     </transportConnectors>
> 
>     <networkConnectors>
>      
>       <networkConnector name="host1"
> uri="static://(tcp://157.185.37.131:61616)" /> 
> 
>     </networkConnectors>
> 
> Consumer App (This is what goes into my connection factory):
> 
>     std::string brokerURI =
>         "tcp://localhost:61616"
> 		"?wireFormat=openwire";
> 
> I guess the first question would be; am I configuring them right? Is there a
> better way of doing this?
> 
> Currently with this configuration I can consume messages but only half of
> them. I am not sure why. 
> 
> Thanks for the help in advance. 
> 
> 
> tabish121 wrote:
> > 
> > Can you tell us a little about what you are doing, possible posting some
> > code showing your producer and consumer.
> > 
> > One thing to keep in mind is that unless you are using a retroactive
> > consumer your producer shouldn't start producing until you've started
> > your consumer.  
> > 
> > If you have specific questions that you need help with please ask, we
> > try and answer them as quickly as possible.
> > 
> > Documentation like anything else on this project grows faster when
> > people participate and contribute.  Feel free to jump in.
> > 
> > Regards
> > Tim.
> > 
> > On Tue, 2007-10-23 at 09:27 -0700, appi03 wrote:
> >> Hey thanks for that example.
> >> 
> >> How does your broker configuration look? Currently, i this is what I have
> >> on
> >> both computers
> >> 
> >> <transportConnector name="openwire" uri="tcp://localhost:61616" />
> >> 
> >>  <networkConnector name="host1"
> >> uri="static://(tcp://157.185.37.184:61616)"
> >> failover="true" dynamicOnly="true" networkTTL="2" /> 
> >> 
> >> But for some reason I am only receiving half of the messages. I am
> >> thinking
> >> something might be wrong in the way I configure my broker.
> >> 
> >> 
> >> 
> >> OB40 wrote:
> >> > 
> >> > Hi,
> >> > 
> >> > You need only one broker on one of the computers. I have learnt most of
> >> > activemq-cpp from the online example which is decent
> >> > (http://activemq.apache.org/cms/example.html). I am also attaching a
> >> > couple of noddies I wrote, one is a transmitter (producer) and the
> >> other
> >> > is a consumer. I have built them on Ubuntu. To run them you will be
> >> need
> >> > to set you LD_LIBRARY_PATH to /usr/local/lib/ and to compile them you
> >> will
> >> > need to add /usr/local/include/activemq-cpp-2.1/ as the include path in
> >> > you g++ command.
> >> > 
> >> > Best of luck.
> >> > 
> >> > 
> >> > appi03 wrote:
> >> >> 
> >> >> I started learning activemq-cpp about a week ago. Right now I feel
> >> like i
> >> >> haven't gotten anywhere. I wonder why? There is no solid documentation
> >> on
> >> >> anything so to the new user, it's pretty confusing. 
> >> >> 
> >> >> Anyhow, I will stop my complaints. but, i need some serious help.
> >> >> 
> >> >> I just want to set up two computers; one producing messages and the
> >> other
> >> >> one consuming messages. Now, do I need to run an activemq broker on
> >> both
> >> >> computers? I believe the answer is no. So then, does anyone have an
> >> >> example that I can look at to use it in this scenario.
> >> >> 
> >> >> If i need to run a broker on both machines, is that embedded broker?
> >> in
> >> >> that case does anyone have a configuration example for that as well? 
> >> >> 
> >> >> Also, when I run the producer and consumer application. How do i
> >> >> configure the connection factory? I have looked and I guess i am just
> >> >> tired of looking now because i haven't found any pages on connection
> >> >> factory. I am not sure how all that ties in together. 
> >> >> 
> >> >> Please help. So i can move on to bigger and better things like
> >> >> persistence. I have something running right now but it just doesn't
> >> make
> >> >> sense anymore. 
> >> >> 
> >> >> help would be appreciated.
> >> >> 
> >> >  http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
> >> > CppQueueReceiver.cpp 
> >> > http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
> >> > CppQueueTransmitter.cpp 
> >> > 
> >> 
> > 
> > 
> 

Re: Help

Posted by appi03 <ar...@sparta.com>.
Here is what I have so far. Btw, I am using activemq-cpp 

Producer Broker:
  
    <transportConnectors>
      <transportConnector name="openwire" uri="tcp://localhost:61616" />  
      <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
      <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>

    <networkConnectors>
           <networkConnector name="host1"
uri="static://(tcp://157.185.37.184:61616)" /> 
    </networkConnectors>

Producer App (This is what goes into my connection factory):

    std::string brokerURI =
        "tcp://localhost:61616"
		"?wireFormat=openwire";


Consumer Broker:
</persistenceAdapter>
  
    <transportConnectors>
      <transportConnector name="openwire" uri="tcp://localhost:61616" />  
      <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
      <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>

    <networkConnectors>
     
      <networkConnector name="host1"
uri="static://(tcp://157.185.37.131:61616)" /> 

    </networkConnectors>

Consumer App (This is what goes into my connection factory):

    std::string brokerURI =
        "tcp://localhost:61616"
		"?wireFormat=openwire";

I guess the first question would be; am I configuring them right? Is there a
better way of doing this?

Currently with this configuration I can consume messages but only half of
them. I am not sure why. 

Thanks for the help in advance. 


tabish121 wrote:
> 
> Can you tell us a little about what you are doing, possible posting some
> code showing your producer and consumer.
> 
> One thing to keep in mind is that unless you are using a retroactive
> consumer your producer shouldn't start producing until you've started
> your consumer.  
> 
> If you have specific questions that you need help with please ask, we
> try and answer them as quickly as possible.
> 
> Documentation like anything else on this project grows faster when
> people participate and contribute.  Feel free to jump in.
> 
> Regards
> Tim.
> 
> On Tue, 2007-10-23 at 09:27 -0700, appi03 wrote:
>> Hey thanks for that example.
>> 
>> How does your broker configuration look? Currently, i this is what I have
>> on
>> both computers
>> 
>> <transportConnector name="openwire" uri="tcp://localhost:61616" />
>> 
>>  <networkConnector name="host1"
>> uri="static://(tcp://157.185.37.184:61616)"
>> failover="true" dynamicOnly="true" networkTTL="2" /> 
>> 
>> But for some reason I am only receiving half of the messages. I am
>> thinking
>> something might be wrong in the way I configure my broker.
>> 
>> 
>> 
>> OB40 wrote:
>> > 
>> > Hi,
>> > 
>> > You need only one broker on one of the computers. I have learnt most of
>> > activemq-cpp from the online example which is decent
>> > (http://activemq.apache.org/cms/example.html). I am also attaching a
>> > couple of noddies I wrote, one is a transmitter (producer) and the
>> other
>> > is a consumer. I have built them on Ubuntu. To run them you will be
>> need
>> > to set you LD_LIBRARY_PATH to /usr/local/lib/ and to compile them you
>> will
>> > need to add /usr/local/include/activemq-cpp-2.1/ as the include path in
>> > you g++ command.
>> > 
>> > Best of luck.
>> > 
>> > 
>> > appi03 wrote:
>> >> 
>> >> I started learning activemq-cpp about a week ago. Right now I feel
>> like i
>> >> haven't gotten anywhere. I wonder why? There is no solid documentation
>> on
>> >> anything so to the new user, it's pretty confusing. 
>> >> 
>> >> Anyhow, I will stop my complaints. but, i need some serious help.
>> >> 
>> >> I just want to set up two computers; one producing messages and the
>> other
>> >> one consuming messages. Now, do I need to run an activemq broker on
>> both
>> >> computers? I believe the answer is no. So then, does anyone have an
>> >> example that I can look at to use it in this scenario.
>> >> 
>> >> If i need to run a broker on both machines, is that embedded broker?
>> in
>> >> that case does anyone have a configuration example for that as well? 
>> >> 
>> >> Also, when I run the producer and consumer application. How do i
>> >> configure the connection factory? I have looked and I guess i am just
>> >> tired of looking now because i haven't found any pages on connection
>> >> factory. I am not sure how all that ties in together. 
>> >> 
>> >> Please help. So i can move on to bigger and better things like
>> >> persistence. I have something running right now but it just doesn't
>> make
>> >> sense anymore. 
>> >> 
>> >> help would be appreciated.
>> >> 
>> >  http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
>> > CppQueueReceiver.cpp 
>> > http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
>> > CppQueueTransmitter.cpp 
>> > 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Help-tf4678118s2354.html#a13369085
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Help

Posted by Timothy Bish <ti...@sensis.com>.
Can you tell us a little about what you are doing, possible posting some
code showing your producer and consumer.

One thing to keep in mind is that unless you are using a retroactive
consumer your producer shouldn't start producing until you've started
your consumer.  

If you have specific questions that you need help with please ask, we
try and answer them as quickly as possible.

Documentation like anything else on this project grows faster when
people participate and contribute.  Feel free to jump in.

Regards
Tim.

On Tue, 2007-10-23 at 09:27 -0700, appi03 wrote:
> Hey thanks for that example.
> 
> How does your broker configuration look? Currently, i this is what I have on
> both computers
> 
> <transportConnector name="openwire" uri="tcp://localhost:61616" />
> 
>  <networkConnector name="host1" uri="static://(tcp://157.185.37.184:61616)"
> failover="true" dynamicOnly="true" networkTTL="2" /> 
> 
> But for some reason I am only receiving half of the messages. I am thinking
> something might be wrong in the way I configure my broker.
> 
> 
> 
> OB40 wrote:
> > 
> > Hi,
> > 
> > You need only one broker on one of the computers. I have learnt most of
> > activemq-cpp from the online example which is decent
> > (http://activemq.apache.org/cms/example.html). I am also attaching a
> > couple of noddies I wrote, one is a transmitter (producer) and the other
> > is a consumer. I have built them on Ubuntu. To run them you will be need
> > to set you LD_LIBRARY_PATH to /usr/local/lib/ and to compile them you will
> > need to add /usr/local/include/activemq-cpp-2.1/ as the include path in
> > you g++ command.
> > 
> > Best of luck.
> > 
> > 
> > appi03 wrote:
> >> 
> >> I started learning activemq-cpp about a week ago. Right now I feel like i
> >> haven't gotten anywhere. I wonder why? There is no solid documentation on
> >> anything so to the new user, it's pretty confusing. 
> >> 
> >> Anyhow, I will stop my complaints. but, i need some serious help.
> >> 
> >> I just want to set up two computers; one producing messages and the other
> >> one consuming messages. Now, do I need to run an activemq broker on both
> >> computers? I believe the answer is no. So then, does anyone have an
> >> example that I can look at to use it in this scenario.
> >> 
> >> If i need to run a broker on both machines, is that embedded broker? in
> >> that case does anyone have a configuration example for that as well? 
> >> 
> >> Also, when I run the producer and consumer application. How do i
> >> configure the connection factory? I have looked and I guess i am just
> >> tired of looking now because i haven't found any pages on connection
> >> factory. I am not sure how all that ties in together. 
> >> 
> >> Please help. So i can move on to bigger and better things like
> >> persistence. I have something running right now but it just doesn't make
> >> sense anymore. 
> >> 
> >> help would be appreciated.
> >> 
> >  http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
> > CppQueueReceiver.cpp 
> > http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
> > CppQueueTransmitter.cpp 
> > 
> 

Re: Help

Posted by appi03 <ar...@sparta.com>.
Hey thanks for that example.

How does your broker configuration look? Currently, i this is what I have on
both computers

<transportConnector name="openwire" uri="tcp://localhost:61616" />

 <networkConnector name="host1" uri="static://(tcp://157.185.37.184:61616)"
failover="true" dynamicOnly="true" networkTTL="2" /> 

But for some reason I am only receiving half of the messages. I am thinking
something might be wrong in the way I configure my broker.



OB40 wrote:
> 
> Hi,
> 
> You need only one broker on one of the computers. I have learnt most of
> activemq-cpp from the online example which is decent
> (http://activemq.apache.org/cms/example.html). I am also attaching a
> couple of noddies I wrote, one is a transmitter (producer) and the other
> is a consumer. I have built them on Ubuntu. To run them you will be need
> to set you LD_LIBRARY_PATH to /usr/local/lib/ and to compile them you will
> need to add /usr/local/include/activemq-cpp-2.1/ as the include path in
> you g++ command.
> 
> Best of luck.
> 
> 
> appi03 wrote:
>> 
>> I started learning activemq-cpp about a week ago. Right now I feel like i
>> haven't gotten anywhere. I wonder why? There is no solid documentation on
>> anything so to the new user, it's pretty confusing. 
>> 
>> Anyhow, I will stop my complaints. but, i need some serious help.
>> 
>> I just want to set up two computers; one producing messages and the other
>> one consuming messages. Now, do I need to run an activemq broker on both
>> computers? I believe the answer is no. So then, does anyone have an
>> example that I can look at to use it in this scenario.
>> 
>> If i need to run a broker on both machines, is that embedded broker? in
>> that case does anyone have a configuration example for that as well? 
>> 
>> Also, when I run the producer and consumer application. How do i
>> configure the connection factory? I have looked and I guess i am just
>> tired of looking now because i haven't found any pages on connection
>> factory. I am not sure how all that ties in together. 
>> 
>> Please help. So i can move on to bigger and better things like
>> persistence. I have something running right now but it just doesn't make
>> sense anymore. 
>> 
>> help would be appreciated.
>> 
>  http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
> CppQueueReceiver.cpp 
> http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
> CppQueueTransmitter.cpp 
> 

-- 
View this message in context: http://www.nabble.com/Help-tf4678118s2354.html#a13367847
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Help

Posted by OB40 <om...@edftrading.com>.
Hi,

You need only one broker on one of the computers. I have learnt most of
activemq-cpp from the online example which is decent
(http://activemq.apache.org/cms/example.html). I am also attaching a couple
of noddies I wrote, one is a transmitter (producer) and the other is a
consumer. I have built them on Ubuntu. To run them you will be need to set
you LD_LIBRARY_PATH to /usr/local/lib/ and to compile them you will need to
add /usr/local/include/activemq-cpp-2.1/ as the include path in you g++
command.

Best of luck.


appi03 wrote:
> 
> I started learning activemq-cpp about a week ago. Right now I feel like i
> haven't gotten anywhere. I wonder why? There is no solid documentation on
> anything so to the new user, it's pretty confusing. 
> 
> Anyhow, I will stop my complaints. but, i need some serious help.
> 
> I just want to set up two computers; one producing messages and the other
> one consuming messages. Now, do I need to run an activemq broker on both
> computers? I believe the answer is no. So then, does anyone have an
> example that I can look at to use it in this scenario.
> 
> If i need to run a broker on both machines, is that embedded broker? in
> that case does anyone have a configuration example for that as well? 
> 
> Also, when I run the producer and consumer application. How do i configure
> the connection factory? I have looked and I guess i am just tired of
> looking now because i haven't found any pages on connection factory. I am
> not sure how all that ties in together. 
> 
> Please help. So i can move on to bigger and better things like
> persistence. I have something running right now but it just doesn't make
> sense anymore. 
> 
> help would be appreciated.
> 
http://www.nabble.com/file/p13367353/CppQueueReceiver.cpp
CppQueueReceiver.cpp 
http://www.nabble.com/file/p13367353/CppQueueTransmitter.cpp
CppQueueTransmitter.cpp 
-- 
View this message in context: http://www.nabble.com/Help-tf4678118s2354.html#a13367353
Sent from the ActiveMQ - User mailing list archive at Nabble.com.