1 /*******************************************************************************
2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ============LICENSE_END=========================================================
19 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21 *******************************************************************************/
22 package com.att.dmf.mr.constants;
24 import com.att.dmf.mr.utils.Utils;
27 * This is the constant files for all the property or parameters.
28 * @author nilanjana.maity
31 public interface CambriaConstants {
33 String CAMBRIA = "Cambria";
34 String DMAAP = "DMaaP";
36 String kDefault_ZkRoot = "/fe3c/cambria";
38 String kSetting_ZkConfigDbRoot = "config.zk.root";
39 String kDefault_ZkConfigDbRoot = kDefault_ZkRoot + "/config";
40 String msgRtr_prop="MsgRtrApi.properties";
41 String kBrokerType = "broker.type";
44 * value to use to signal kafka broker type.
46 String kBrokerType_Kafka = "kafka";
47 String kBrokerType_Memory = "memory";
48 String kSetting_AdminSecret = "authentication.adminSecret";
50 String kSetting_ApiNodeIdentifier = "cambria.api.node.identifier";
53 * value to use to signal max empty poll per minute
55 String kSetting_MaxEmptyPollsPerMinute = "cambria.rateLimit.maxEmptyPollsPerMinute";
56 String kSetting_MaxPollsPerMinute = "cambria.rateLimit.maxEmptyPollsPerMinute";
57 double kDefault_MaxEmptyPollsPerMinute = 10.0;
59 String kSetting_SleepMsOnRateLimit = "cambria.rateLimit.delay.ms";
60 String kSetting_SleepMsRealOnRateLimit = "cambria.rateLimitActual.delay.ms";
61 long kDefault_SleepMsOnRateLimit = Utils.getSleepMsForRate ( kDefault_MaxEmptyPollsPerMinute );
63 String kSetting_RateLimitWindowLength = "cambria.rateLimit.window.minutes";
64 int kDefault_RateLimitWindowLength = 5;
68 String kSetting_Port = "cambria.service.port";
70 * value to use to signal default port
72 int kDefault_Port = 3904;
74 String kSetting_MaxThreads = "tomcat.maxthreads";
75 int kDefault_MaxThreads = -1;
79 //String kDefault_TomcatProtocolClass = Http11NioProtocol.class.getName ();
81 String kSetting_ZkConfigDbServers = "config.zk.servers";
84 * value to indicate localhost port number
86 String kDefault_ZkConfigDbServers = "localhost:2181";
89 * value to use to signal Session time out
91 String kSetting_ZkSessionTimeoutMs = "cambria.consumer.cache.zkSessionTimeout";
92 int kDefault_ZkSessionTimeoutMs = 20 * 1000;
95 * value to use to signal connection time out
97 String kSetting_ZkConnectionTimeoutMs = "cambria.consumer.cache.zkConnectionTimeout";
98 int kDefault_ZkConnectionTimeoutMs = 5 * 1000;
100 String TRANSACTION_ID_SEPARATOR = "::";
103 * value to use to signal there's no timeout on the consumer request.
105 public static final int kNoTimeout = 10000;
108 * value to use to signal no limit in the number of messages returned.
110 public static final int kNoLimit = 0;
113 * value to use to signal that the caller wants the next set of events
115 public static final int kNextOffset = -1;
118 * value to use to signal there's no filter on the response stream.
120 public static final String kNoFilter = "";
122 //Added for Metric publish
123 public static final int kStdCambriaServicePort = 3904;
124 public static final String kBasePath = "/events/";