[
https://issues.apache.org/activemq/browse/AMQNET-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Ländle updated AMQNET-237:
----------------------------------
Attachment: activemq.xml
If attached my broker configuration.
Here is also a code-snippet that exactly reproduces the issue.
[Test]
public void ReproduceAmqNet237()
{
var factory = new
Apache.NMS.Stomp.ConnectionFactory("stomp:tcp://entwicklung031:61613") {
UserName = "eetour.test.server", Password = "ets" };
using (var connection = factory.CreateConnection())
using (var session =
connection.CreateSession(AcknowledgementMode.Transactional))
{
var destination = SessionUtil.GetDestination(session,
"queue://does_not_exist"); // and user hasn't the right to create!
using (var temporaryProducer = session.CreateProducer(destination))
{
var nmsMessage = session.CreateBytesMessage(new byte[] { 1, 2, 3 });
// The following lines succedd even the message couldn't be
delivered. More worse the message is lost.
temporaryProducer.Send(nmsMessage);
session.Commit();
}
}
}
I hope that things are more clear now. I expect that i get some notification
(maybe in form of a exception) that the message couldn't be delivered.
Please let me know if you need further assistance to reproduce and/or
understand my problem.
> NMS/Stomp: MessageProducer.Send(message) ignores exceptions occurring on
> broker because the destination is invalid.
> -------------------------------------------------------------------------------------------------------------------
>
> Key: AMQNET-237
> URL: https://issues.apache.org/activemq/browse/AMQNET-237
> Project: ActiveMQ .Net
> Issue Type: Improvement
> Components: ActiveMQ, NMS
> Affects Versions: 1.2.0
> Environment: Win7, ActiveMq 5.3.0, Apache.NMS & Apache.NMS.Stomp
> 1.2.0.
> Reporter: Andreas Ländle
> Assignee: Jim Gomes
> Priority: Minor
> Attachments: activemq.xml
>
>
> If i send a message to an inexistent destination (and i don't have rights to
> create the destination) the attached exceptions is raised on the broker.
> Unfortunately i didn't see the exception on the client side.
> The call to MessageProducer.Send(message) returns without any exception. Is
> this behavior intended?
> How should i determine if the message was accepted by the server? Shouldn't i
> get some notification on client side? Am i doing something wrong? Was i
> missing some events i could register to get notified of such problems? If so
> please excuse this issue.
> Please let me know if you need more information.
> Thanks in advance,
> Andreas Ländle
> The following error occurs on the broker (ActiveMq 5.3.0).
> Async error occurred: java.lang.SecurityException: User <user> is not
> authorized to create: queue://<invalid_queue> |
> org.apache.activemq.broker.TransportConnection.Service | ActiveMQ Transport:
> tcp:///192.168.150.5:51909
> java.lang.SecurityException: User <user> is not authorized to create:
> queue://<invalid_queue>
> at
> org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:69)
> at
> org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:149)
> at
> org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:425)
> at
> org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:224)
> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
> at
> org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:95)
> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
> at org.apache.activemq.broker.UserIDBroker.send(UserIDBroker.java:39)
> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
> at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:126)
> at
> org.apache.activemq.security.AuthorizationBroker.send(AuthorizationBroker.java:181)
> at
> org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:133)
> at
> org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:443)
> at
> org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:631)
> at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:297)
> at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:175)
> at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> at
> org.apache.activemq.transport.stomp.StompTransportFilter.sendToActiveMQ(StompTransportFilter.java:78)
> at
> org.apache.activemq.transport.stomp.ProtocolConverter.sendToActiveMQ(ProtocolConverter.java:135)
> at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompSend(ProtocolConverter.java:247)
> at
> org.apache.activemq.transport.stomp.ProtocolConverter.onStompCommand(ProtocolConverter.java:173)
> at
> org.apache.activemq.transport.stomp.StompTransportFilter.onCommand(StompTransportFilter.java:67)
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.