1 /*******************************************************************************
2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * Modification copyright (C) 2021 Nordix Foundation.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 *******************************************************************************/
23 package org.onap.dmaap.dmf.mr.constants;
25 import org.onap.dmaap.dmf.mr.utils.Utils;
28 * This is the constant files for all the property or parameters.
29 * @author nilanjana.maity
32 public interface CambriaConstants {
34 String CAMBRIA = "Cambria";
35 String DMAAP = "DMaaP";
37 String kDefault_ZkRoot = "/fe3c/cambria";
39 String kSetting_ZkConfigDbRoot = "config.zk.root";
40 String kDefault_ZkConfigDbRoot = kDefault_ZkRoot + "/config";
41 String msgRtr_prop="MsgRtrApi.properties";
42 String kBrokerType = "broker.type";
45 * value to use to signal kafka broker type.
47 String kBrokerType_Kafka = "kafka";
48 String kBrokerType_Memory = "memory";
49 String kSetting_AdminSecret = "authentication.adminSecret";
51 String kSetting_ApiNodeIdentifier = "cambria.api.node.identifier";
54 * value to use to signal max empty poll per minute
56 String kSetting_MaxEmptyPollsPerMinute = "cambria.rateLimit.maxEmptyPollsPerMinute";
57 String kSetting_MaxPollsPerMinute = "cambria.rateLimit.maxEmptyPollsPerMinute";
58 double kDefault_MaxEmptyPollsPerMinute = 10.0;
60 String kSetting_SleepMsOnRateLimit = "cambria.rateLimit.delay.ms";
61 String kSetting_SleepMsRealOnRateLimit = "cambria.rateLimitActual.delay.ms";
62 long kDefault_SleepMsOnRateLimit = Utils.getSleepMsForRate ( kDefault_MaxEmptyPollsPerMinute );
64 String kSetting_RateLimitWindowLength = "cambria.rateLimit.window.minutes";
65 int kDefault_RateLimitWindowLength = 5;
69 String kSetting_Port = "cambria.service.port";
71 * value to use to signal default port
73 int kDefault_Port = 3904;
75 String kSetting_MaxThreads = "tomcat.maxthreads";
76 int kDefault_MaxThreads = -1;
80 //String kDefault_TomcatProtocolClass = Http11NioProtocol.class.getName ();
82 String kSetting_ZkConfigDbServers = "config.zk.servers";
85 * value to indicate localhost port number
87 String kDefault_ZkConfigDbServers = "localhost:2181";
90 * value to use to signal Session time out
92 String kSetting_ZkSessionTimeoutMs = "cambria.consumer.cache.zkSessionTimeout";
93 int kDefault_ZkSessionTimeoutMs = 20 * 1000;
96 * value to use to signal connection time out
98 String kSetting_ZkConnectionTimeoutMs = "cambria.consumer.cache.zkConnectionTimeout";
99 int kDefault_ZkConnectionTimeoutMs = 5 * 1000;
101 String TRANSACTION_ID_SEPARATOR = "::";
104 * value to use to signal there's no timeout on the consumer request.
106 public static final int kNoTimeout = 10000;
109 * value to use to signal no limit in the number of messages returned.
111 public static final int kNoLimit = 0;
114 * value to use to signal that the caller wants the next set of events
116 public static final int kNextOffset = -1;
119 * value to use to signal there's no filter on the response stream.
121 public static final String kNoFilter = "";
123 //Added for Metric publish
124 public static final int kStdCambriaServicePort = 3904;
125 public static final String kBasePath = "/events/";