@Override public Message getMessage(MessageId identity) throws IOException { return delegate.getMessage(identity); }
@Override public Message getMessage(MessageId identity) throws IOException { return delegate.getMessage(identity); }
/** * */ public Message getMessage(MessageId identity) throws IOException { Message answer = null; synchronized (this) { // Do we have a still have it in the journal? answer = messages.get(identity); if (answer == null && cpAddedMessageIds != null) { answer = cpAddedMessageIds.get(identity); } } if (answer != null) { return answer; } // If all else fails try the long term message store. return longTermStore.getMessage(identity); }
Message loadMessage(MessageId messageId) throws IOException { Message msg = null; if (store != null) { // can be null for a temp q msg = store.getMessage(messageId); if (msg != null) { msg.setRegionDestination(this); } } return msg; }
@Override public boolean recoverMessageReference(MessageId messageReference) throws Exception { Message msg = this.store.getMessage(messageReference); if (msg != null) { return recoverMessage(msg); } else { String err = "Failed to retrieve message for id: " + messageReference; LOG.error(err); throw new IOException(err); } }
public void replayAddMessage(ConnectionContext context, Message message) { try { // Only add the message if it has not already been added. Message t = longTermStore.getMessage(message.getMessageId()); if (t == null) { longTermStore.addMessage(context, message); } } catch (Throwable e) { LOG.warn("Could not replay add for message '" + message.getMessageId() + "'. Message may have already been added. reason: " + e); } }
public void replayRemoveMessage(ConnectionContext context, MessageAck messageAck) { try { // Only remove the message if it has not already been removed. Message t = longTermStore.getMessage(messageAck.getLastMessageId()); if (t != null) { longTermStore.removeMessage(context, messageAck); } } catch (Throwable e) { LOG.warn("Could not replay acknowledge for message '" + messageAck.getLastMessageId() + "'. Message may have already been acknowledged. reason: " + e); } }
@Override public boolean recoverMessageReference(MessageId messageReference) throws Exception { Message msg = this.store.getMessage(messageReference); if (msg != null) { return recoverMessage(msg); } else { String err = "Failed to retrieve message for id: " + messageReference; LOG.error(err); throw new IOException(err); } }
Message loadMessage(MessageId messageId) throws IOException { Message msg = null; if (store != null) { // can be null for a temp q msg = store.getMessage(messageId); if (msg != null) { msg.setRegionDestination(this); } } return msg; }
Message loadMessage(MessageId messageId) throws IOException { Message msg = null; if (store != null) { // can be null for a temp q msg = store.getMessage(messageId); if (msg != null) { msg.setRegionDestination(this); } } return msg; }
@Override public boolean recoverMessageReference(MessageId messageReference) throws Exception { Message msg = this.store.getMessage(messageReference); if (msg != null) { return recoverMessage(msg); } else { String err = "Failed to retrieve message for id: " + messageReference; LOG.error(err); throw new IOException(err); } }
@Override public boolean recoverMessageReference(MessageId messageReference) throws Exception { Message msg = this.store.getMessage(messageReference); if (msg != null) { return recoverMessage(msg); } else { String err = "Failed to retrieve message for id: " + messageReference; LOG.error(err); throw new IOException(err); } }
Message loadMessage(MessageId messageId) throws IOException { Message msg = null; if (store != null) { // can be null for a temp q msg = store.getMessage(messageId); if (msg != null) { msg.setRegionDestination(this); } } return msg; }
public void replayAddMessage(ConnectionContext context, Message message) { try { // Only add the message if it has not already been added. Message t = longTermStore.getMessage(message.getMessageId()); if (t == null) { longTermStore.addMessage(context, message); } } catch (Throwable e) { LOG.warn("Could not replay add for message '" + message.getMessageId() + "'. Message may have already been added. reason: " + e); } }
public void replayRemoveMessage(ConnectionContext context, MessageAck messageAck) { try { // Only remove the message if it has not already been removed. Message t = longTermStore.getMessage(messageAck.getLastMessageId()); if (t != null) { longTermStore.removeMessage(context, messageAck); } } catch (Throwable e) { LOG.warn("Could not replay acknowledge for message '" + messageAck.getLastMessageId() + "'. Message may have already been acknowledged. reason: " + e); } }
public void replayAddMessage(ConnectionContext context, Message message) { try { // Only add the message if it has not already been added. Message t = longTermStore.getMessage(message.getMessageId()); if (t == null) { longTermStore.addMessage(context, message); } } catch (Throwable e) { LOG.warn("Could not replay add for message '" + message.getMessageId() + "'. Message may have already been added. reason: " + e); } }
public void replayRemoveMessage(ConnectionContext context, MessageAck messageAck) { try { // Only remove the message if it has not already been removed. Message t = longTermStore.getMessage(messageAck.getLastMessageId()); if (t != null) { longTermStore.removeMessage(context, messageAck); } } catch (Throwable e) { LOG.warn("Could not replay acknowledge for message '" + messageAck.getLastMessageId() + "'. Message may have already been acknowledged. reason: " + e); } }
public boolean recoverMessageReference(MessageId ref) throws Exception { Message message = this.store.getMessage(ref); if (message != null) { return recoverMessage(message); } else { throw new IllegalStateException("Message id " + ref + " could not be recovered from the data store for: " + store.getDestination().getQualifiedName() + " - already dispatched"); } }
public void replayRemoveMessage(ConnectionContext context, MessageAck messageAck) { try { // Only remove the message if it has not already been removed. Message t = longTermStore.getMessage(messageAck.getLastMessageId()); if (t != null) { longTermStore.removeMessage(context, messageAck); } } catch (Throwable e) { LOG.warn("Could not replay acknowledge for message '" + messageAck.getLastMessageId() + "'. Message may have already been acknowledged. reason: " + e); } }
public void replayAddMessage(ConnectionContext context, Message message) { try { // Only add the message if it has not already been added. Message t = longTermStore.getMessage(message.getMessageId()); if (t == null) { longTermStore.addMessage(context, message); } } catch (Throwable e) { LOG.warn("Could not replay add for message '" + message.getMessageId() + "'. Message may have already been added. reason: " + e); } }