activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From appi03 <arpit.s...@sparta.com>
Subject Re: Help
Date Tue, 23 Oct 2007 17:36:55 GMT

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.


Mime
View raw message