You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Vavricka <va...@gmail.com> on 2015/08/26 09:43:29 UTC
Exception when sending 10 kB message
Hi,
I am testing Artemis and I get exception when sending 10 kB message(s). I
tried before 1 kB without any issue.
I am using default generated broker.xml, only added core queues used for
testing. In artemis.profile I increased memory to -Xms20000M -Xmx20000M.
Other configuration values are generated when broker was created.
I checked documentation and I couldn't find any configuration parameter
that could solve this.
Am I doing something wrong?
Exception below:
java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:267)
at
org.apache.qpid.proton.codec.DecoderImpl.readRaw(DecoderImpl.java:945)
at
org.apache.qpid.proton.codec.StringType$AllStringEncoding.readValue(StringType.java:169)
at
org.apache.qpid.proton.codec.StringType$AllStringEncoding.readValue(StringType.java:121)
at
org.apache.qpid.proton.codec.DynamicTypeConstructor.readValue(DynamicTypeConstructor.java:39)
at
org.apache.qpid.proton.codec.DecoderImpl.readObject(DecoderImpl.java:885)
at
org.apache.qpid.proton.message.impl.MessageImpl.decode(MessageImpl.java:647)
at
org.apache.qpid.proton.message.impl.MessageImpl.decode(MessageImpl.java:577)
at
org.apache.qpid.proton.jms.EncodedMessage.decode(EncodedMessage.java:46)
at
org.apache.qpid.proton.jms.JMSMappingInboundTransformer.transform(JMSMappingInboundTransformer.java:40)
at
org.apache.activemq.artemis.core.protocol.proton.converter.ProtonMessageConverter.inboundJMSType(ProtonMessageConverter.java:61)
at
org.apache.activemq.artemis.core.protocol.proton.converter.ProtonMessageConverter.inbound(ProtonMessageConverter.java:47)
at
org.apache.activemq.artemis.core.protocol.proton.plug.ProtonSessionIntegrationCallback.serverSend(ProtonSessionIntegrationCallback.java:269)
at
org.proton.plug.context.server.ProtonServerReceiverContext.onMessage(ProtonServerReceiverContext.java:131)
at
org.proton.plug.context.AbstractConnectionContext$LocalListener.onDelivery(AbstractConnectionContext.java:277)
at org.proton.plug.handler.Events.dispatch(Events.java:104)
at
org.proton.plug.handler.impl.ProtonHandlerImpl.dispatch(ProtonHandlerImpl.java:399)
at
org.proton.plug.handler.impl.ProtonHandlerImpl.flush(ProtonHandlerImpl.java:298)
at
org.proton.plug.handler.impl.ProtonHandlerImpl.inputBuffer(ProtonHandlerImpl.java:178)
at
org.proton.plug.context.AbstractConnectionContext.inputBuffer(AbstractConnectionContext.java:72)
at
org.apache.activemq.artemis.core.protocol.proton.ActiveMQProtonRemotingConnection.bufferReceived(ActiveMQProtonRemotingConnection.java:142)
at
org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:694)
at
org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:318)
at
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125)
at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:507)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)
at
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:745)
Vavricka
--
View this message in context: http://activemq.2283324.n4.nabble.com/Exception-when-sending-10-kB-message-tp4701387.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Exception when sending 10 kB message
Posted by Vavricka <va...@gmail.com>.
I am sending message using Apache qpid JMS client -
http://qpid.apache.org/components/jms/
try
{
ctx = new InitialContext(properties);
connection = ((ConnectionFactory)
ctx.lookup("connection")).createConnection();
session = connection.createSession(false,
Session.CLIENT_ACKNOWLEDGE);
producer = session.createProducer((Destination)
ctx.lookup("address"));
if (!options.persistent)
{
producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
}
else
{
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
}
connection.start();
TextMessage message =
session.createTextMessage(options.messageText);
producer.send(message);
producer.close();
session.close();
connection.close();
}
catch (NamingException | JMSException e)
{
e.printStackTrace();
}
properties:
java.naming.factory.initial=org.apache.qpid.jms.jndi.JmsInitialContextFactory
connectionfactory.connection=amqp://cbgc03:5672?amqp.idleTimeout=0&jms.username=admin&jms.password=admin&jms.forceAsyncSend=true
queue.address=test.queue
options.messageText is generated by:
private static String createMessage(int messageSize)
{
final String AB = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
Random rnd = new Random();
StringBuilder sb = new StringBuilder((int) messageSize);
for (int j = 0; j < messageSize; j++ )
{
sb.append(AB.charAt(rnd.nextInt(AB.length())));
}
return sb.toString();
}
I tried both persistent and non_persistent messages and sending both
messages ended with exception on the server. I also tried to remove
jms.forceAsyncSend and amqp.idleTimeout from connection string with same
result.
Vavricka
--
View this message in context: http://activemq.2283324.n4.nabble.com/Exception-when-sending-10-kB-message-tp4701387p4701391.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.