@Override public String getProducerName() { checkNotNull(msgMetadataBuilder); if (msgMetadataBuilder.hasProducerName()) { return msgMetadataBuilder.getProducerName(); } return null; }
if (!msg.isReplicated() && msgMetadataBuilder.hasProducerName()) { PulsarClientException.InvalidMessageException invalidMessageException = new PulsarClientException.InvalidMessageException("Cannot re-use the same message"); msgMetadataBuilder.setPublishTime(System.currentTimeMillis()); checkArgument(!msgMetadataBuilder.hasProducerName());
@Override public String getProducerName() { checkNotNull(msgMetadataBuilder); if (msgMetadataBuilder.hasProducerName()) { return msgMetadataBuilder.getProducerName(); } return null; }
if (!msg.isReplicated() && msgMetadataBuilder.hasProducerName()) { PulsarClientException.InvalidMessageException invalidMessageException = new PulsarClientException.InvalidMessageException("Cannot re-use the same message"); msgMetadataBuilder.setPublishTime(System.currentTimeMillis()); checkArgument(!msgMetadataBuilder.hasProducerName());
public final boolean isInitialized() { if (!hasProducerName()) { return false; } if (!hasSequenceId()) { return false; } if (!hasPublishTime()) { return false; } for (int i = 0; i < getPropertiesCount(); i++) { if (!getProperties(i).isInitialized()) { return false; } } for (int i = 0; i < getEncryptionKeysCount(); i++) { if (!getEncryptionKeys(i).isInitialized()) { return false; } } return true; }
public final boolean isInitialized() { if (!hasProducerName()) { return false; } if (!hasSequenceId()) { return false; } if (!hasPublishTime()) { return false; } for (int i = 0; i < getPropertiesCount(); i++) { if (!getProperties(i).isInitialized()) { return false; } } for (int i = 0; i < getEncryptionKeysCount(); i++) { if (!getEncryptionKeys(i).isInitialized()) { return false; } } return true; }