Examples of MessageId


Examples of org.apache.activemq.command.MessageId

            throw new InterruptedIOException();
        }
    }

    public boolean replayAddMessage(ConnectionContext context, Message message, Location location) {
        MessageId id = message.getMessageId();
        try {
            // Only add the message if it has not already been added.
            ReferenceData data = referenceStore.getMessageReference(id);
            if (data == null) {
                data = new ReferenceData();
View Full Code Here

Examples of org.apache.activemq.command.MessageId

    final void removeMessage(final MessageAck ack, final Location location) throws InterruptedIOException {
        ReferenceData data;
        synchronized (this) {
            lastLocation = location;
            MessageId id = ack.getLastMessageId();
            data = messages.remove(id);
            if (data == null) {
                messageAcks.add(ack);
            }
        }
View Full Code Here

Examples of org.apache.activemq.command.MessageId

    @Override
    public synchronized void addMessage(ConnectionContext context, Message message) throws IOException {
        int subscriberCount = subscriberMessages.size();
        if (subscriberCount > 0) {
            MessageId id = message.getMessageId();
            StoreEntry messageEntry = messageContainer.place(id, message);
            TopicSubAck tsa = new TopicSubAck();
            tsa.setCount(subscriberCount);
            tsa.setMessageEntry(messageEntry);
            StoreEntry ackEntry = ackContainer.placeLast(tsa);
View Full Code Here

Examples of org.apache.activemq.command.MessageId

        if (eosMessage) {
            msg.setGroupSequence(-1);
        } else {
            msg.setGroupSequence((int)messageSequence);
        }
        MessageId id = new MessageId(info.getProducerId(), messageSequence++);
        connection.send(info.getDestination(), msg, id, deliveryMode, priority, timeToLive, !eosMessage);
    }
View Full Code Here

Examples of org.apache.activemq.command.MessageId

        int count = 0;
        for (Iterator iter = dispatchedMessage.entrySet().iterator(); iter.hasNext();) {

            Map.Entry entry = (Entry)iter.next();
            String id = (String)entry.getKey();
            MessageId msgid = (MessageId)entry.getValue();

            if (ack.getFirstMessageId() == null) {
                ack.setFirstMessageId(msgid);
            }
View Full Code Here

Examples of org.apache.activemq.command.MessageId

        String stompTx = headers.get(Stomp.Headers.TRANSACTION);

        ActiveMQMessage message = convertMessage(command);

        message.setProducerId(producerId);
        MessageId id = new MessageId(producerId, messageIdGenerator.getNextSequenceId());
        message.setMessageId(id);
        message.setJMSTimestamp(System.currentTimeMillis());

        if (stompTx != null) {
            TransactionId activemqTx = transactions.get(stompTx);
View Full Code Here

Examples of org.apache.activemq.command.MessageId

        if (eosMessage) {
            msg.setGroupSequence(-1);
        } else {
            msg.setGroupSequence((int) messageSequence);
        }
        MessageId id = new MessageId(info.getProducerId(), messageSequence++);
        connection.send(info.getDestination(), msg, id, deliveryMode, priority, timeToLive, !eosMessage);
    }
View Full Code Here

Examples of org.apache.activemq.command.MessageId

           
            for (Long sequenceId : matches) {
                MessageKeys keys = sd.orderIndex.remove(tx, sequenceId);
                sd.locationIndex.remove(tx, keys.location);
                sd.messageIdIndex.remove(tx, keys.messageId);
                metadata.producerSequenceIdTracker.rollback(new MessageId(keys.messageId));
                undoCounter++;
                // TODO: do we need to modify the ack positions for the pub sub case?
      }
        }
View Full Code Here

Examples of org.apache.activemq.command.MessageId

            if (repeat != 0 || cronStr != null && cronStr.length() > 0) {
                // create a unique id - the original message could be sent
                // lots of times
                messageSend.setMessageId(
                    new MessageId(this.producerId, this.messageIdGenerator.getNextSequenceId()));
            }

            // Add the jobId as a property
            messageSend.setProperty("scheduledJobId", id);
View Full Code Here

Examples of org.apache.activemq.command.MessageId

        try {
            Message msg = (Message) this.wireFormat.unmarshal(packet);
            msg.setOriginalTransactionId(null);
        msg.setPersistent(false);
        msg.setType(AdvisorySupport.ADIVSORY_MESSAGE_TYPE);
        msg.setMessageId(new MessageId(this.producerId, this.messageIdGenerator.getNextSequenceId()));
        msg.setDestination(replyTo);
        msg.setResponseRequired(false);
        msg.setProducerId(this.producerId);

            // Add the jobId as a property
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.