I didn't have the exact code I am using ,so I can only explain the pseudo
code further :
//I set up the objects which is necessary to send msgs in the beginning of
the program
IConnectionFactory f1 = new ConnectionFactory("some url");
IConnection c1 = f1.CreateConnection();
ISession s1 = c1.CreateSession(AcknowledgementMode.Transactional);
ITopic topic = Apache.NMS.Command.Topic("Testing Topic");
........somewhere else in the code ..........
//I create 10 producers to send messages concurrently , as you can see
//they are created from the same session. The session is set to
transactional mode.
for(int i=0;i<10;i++)//
{
IMessageProducer prod = s1.CreateProducer(destination);
System.Threading.Thread t = new Thread(SendMessage);
t.Start(prod);
}
private void SendMessage(object data)
{
IMessageProducer prod = (IMessageProducer)data;
//........I create a BytesMessage .........
for(int i = 0 ;i<10000 ; i++)
prod.send(............)//I send Message persistently , I didn't type
out all the params in send method
s1.commit();//commit the transaction
}
HellKnight wrote
> I am using activemq 5.8.0 , jdk 1.7 , c# NMS (.NET 4.0).
> I write a producer and a consumer program for testing purpose. But I get
> the warning in the subject of this post : waiting for space to send
> transacted message .
>
> the producer program is sth like this(not the complete code) :
> //please refer to the program in my reply post
>
>
> the main part of the producer program is above. I didn't change the
> activemq.xml file , which means I am using the default configration of
> activemq. And from the web console I found out that no single message got
> enqueueed.
>
> Please help and thank you in advance .
--
View this message in context:
http://activemq.2283324.n4.nabble.com/Why-I-get-waiting-for-space-to-send-transacted-message-warning-tp4670902p4670916.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.