Search in sources :

Example 26 with BytesMessageImpl

use of com.swiftmq.jms.BytesMessageImpl in project swiftmq-ce by iitsoftware.

the class TopicAnnounceSender method send.

// <-- Exposed Methods
private void send(String dest, QueueSender sender, VersionObject vo) throws Exception {
    if (ctx.traceSpace.enabled)
        ctx.traceSpace.trace(ctx.topicManager.getName(), toString() + "/send, dest: " + dest + ", vo: " + vo);
    dos.rewind();
    dos.writeInt(vo.getDumpId());
    vo.writeContent(dos);
    BytesMessageImpl msg = new BytesMessageImpl();
    msg.writeBytes(dos.getBuffer(), 0, dos.getCount());
    msg.setJMSPriority(MessageImpl.MAX_PRIORITY);
    msg.setJMSDestination(new QueueImpl(TopicManagerImpl.TOPIC_QUEUE + "@" + dest));
    QueuePushTransaction transaction = sender.createTransaction();
    transaction.putMessage(msg);
    transaction.commit();
}
Also used : QueuePushTransaction(com.swiftmq.swiftlet.queue.QueuePushTransaction) BytesMessageImpl(com.swiftmq.jms.BytesMessageImpl) QueueImpl(com.swiftmq.jms.QueueImpl)

Aggregations

BytesMessageImpl (com.swiftmq.jms.BytesMessageImpl)26 QueuePushTransaction (com.swiftmq.swiftlet.queue.QueuePushTransaction)5 QueueImpl (com.swiftmq.jms.QueueImpl)4 List (java.util.List)4 JMSException (javax.jms.JMSException)4 Endpoint (com.swiftmq.admin.mgmt.Endpoint)2 ContentHeaderProperties (com.swiftmq.amqp.v091.types.ContentHeaderProperties)2 ByteBuf (com.swiftmq.impl.mqtt.v311.netty.buffer.ByteBuf)2 TextMessageImpl (com.swiftmq.jms.TextMessageImpl)2 XidImpl (com.swiftmq.jms.XidImpl)2 StoreEntry (com.swiftmq.swiftlet.store.StoreEntry)2 Dumpable (com.swiftmq.tools.dump.Dumpable)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 BytesMessage (javax.jms.BytesMessage)2 Field (com.swiftmq.amqp.v091.types.Field)1 AMQPException (com.swiftmq.amqp.v100.client.AMQPException)1 Delivery (com.swiftmq.impl.amqp.amqp.v00_09_01.Delivery)1 MqttFixedHeader (com.swiftmq.impl.mqtt.v311.netty.handler.codec.mqtt.MqttFixedHeader)1 QueueIndexEntry (com.swiftmq.impl.store.standard.index.QueueIndexEntry)1