@JsonIgnore public boolean isReplicationConfirmRequired() { return getAck() == Ack.ALL; }
@JsonCreator public TopicWithSchema(@JsonProperty("schema") String schema, @JsonProperty("name") String qualifiedName, @JsonProperty("description") String description, @JsonProperty("owner") OwnerId owner, @JsonProperty("retentionTime") RetentionTime retentionTime, @JsonProperty("jsonToAvroDryRun") boolean jsonToAvroDryRunEnabled, @JsonProperty("ack") Ack ack, @JsonProperty("trackingEnabled") boolean trackingEnabled, @JsonProperty("migratedFromJsonType") boolean migratedFromJsonType, @JsonProperty("schemaVersionAwareSerializationEnabled") boolean schemaVersionAwareSerializationEnabled, @JsonProperty("contentType") ContentType contentType, @JsonProperty("maxMessageSize") Integer maxMessageSize, @JsonProperty("auth") PublishingAuth publishingAuth, @JsonProperty("subscribingRestricted") boolean subscribingRestricted, @JsonProperty("offlineStorage") TopicDataOfflineStorage offlineStorage) { super(qualifiedName, description, owner, retentionTime, jsonToAvroDryRunEnabled, ack, trackingEnabled, migratedFromJsonType, schemaVersionAwareSerializationEnabled, contentType, maxMessageSize, publishingAuth, subscribingRestricted, offlineStorage); this.topic = convertToTopic(); this.schema = schema; }
public CachedTopic(Topic topic, HermesMetrics hermesMetrics, KafkaTopics kafkaTopics, boolean blacklisted) { this.topic = topic; this.kafkaTopics = kafkaTopics; this.hermesMetrics = hermesMetrics; this.blacklisted = blacklisted; globalRequestMeter = hermesMetrics.meter(Meters.METER); topicRequestMeter = hermesMetrics.meter(Meters.TOPIC_METER, topic.getName()); globalDelayedProcessingMeter = hermesMetrics.meter(Meters.DELAYED_PROCESSING); topicDelayedProcessingMeter = hermesMetrics.meter(Meters.TOPIC_DELAYED_PROCESSING, topic.getName()); globalRequestReadLatencyTimer = hermesMetrics.timer(Timers.PARSING_REQUEST); topicRequestReadLatencyTimer = hermesMetrics.timer(Timers.TOPIC_PARSING_REQUEST, topic.getName()); globalMessageCreationTimer = hermesMetrics.timer(Timers.MESSAGE_CREATION_LATENCY); topicMessageCreationTimer = hermesMetrics.timer(Timers.MESSAGE_CREATION_TOPIC_LATENCY, topic.getName()); topicMessageContentSize = hermesMetrics.messageContentSizeHistogram(topic.getName()); globalMessageContentSize = hermesMetrics.messageContentSizeHistogram(); published = hermesMetrics.counter(Counters.PUBLISHED, topic.getName()); globalThroughputMeter = hermesMetrics.meter(Meters.THROUGHPUT_BYTES); topicThroughputMeter = hermesMetrics.meter(Meters.TOPIC_THROUGHPUT_BYTES, topic.getName()); if (Topic.Ack.ALL.equals(topic.getAck())) { topicProducerLatencyTimer = hermesMetrics.timer(Timers.ACK_ALL_LATENCY); globalProducerLatencyTimer = hermesMetrics.timer(Timers.ACK_ALL_TOPIC_LATENCY, topic.getName()); topicBrokerLatencyTimer = hermesMetrics.timer(Timers.ACK_ALL_BROKER_LATENCY); globalBrokerLatencyTimer = hermesMetrics.timer(Timers.ACK_ALL_BROKER_TOPIC_LATENCY, topic.getName()); } else { topicProducerLatencyTimer = hermesMetrics.timer(Timers.ACK_LEADER_LATENCY); globalProducerLatencyTimer = hermesMetrics.timer(Timers.ACK_LEADER_TOPIC_LATENCY, topic.getName()); topicBrokerLatencyTimer = hermesMetrics.timer(Timers.ACK_LEADER_BROKER_LATENCY); globalBrokerLatencyTimer = hermesMetrics.timer(Timers.ACK_LEADER_BROKER_TOPIC_LATENCY, topic.getName()); } }