[DMAAP-MR] Remove redundant data
[dmaap/messagerouter/messageservice.git] / src / main / java / org / onap / dmaap / dmf / mr / constants / CambriaConstants.java
1 /*******************************************************************************
2  *  ============LICENSE_START=======================================================
3  *  org.onap.dmaap
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
12 *  
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=========================================================
19  *  
20  *  ECOMP is a trademark and service mark of AT&T Intellectual Property.
21  *  
22  *******************************************************************************/
23 package org.onap.dmaap.dmf.mr.constants;
24
25 import org.onap.dmaap.dmf.mr.utils.Utils;
26
27 /**
28  * This is the constant files for all the property or parameters.
29  * @author nilanjana.maity
30  *
31  */
32 public interface CambriaConstants {
33
34         String CAMBRIA = "Cambria";
35         String DMAAP = "DMaaP";
36
37         String kDefault_ZkRoot = "/fe3c/cambria";
38
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";
43         
44         /**
45          * value to use to signal kafka broker type.
46          */
47         String kBrokerType_Kafka = "kafka";
48         String kBrokerType_Memory = "memory";
49         String kSetting_AdminSecret = "authentication.adminSecret";
50
51         String kSetting_ApiNodeIdentifier = "cambria.api.node.identifier";
52
53         /**
54          * value to use to signal max empty poll per minute
55          */
56         String kSetting_MaxEmptyPollsPerMinute = "cambria.rateLimit.maxEmptyPollsPerMinute";
57         String kSetting_MaxPollsPerMinute = "cambria.rateLimit.maxEmptyPollsPerMinute";
58         double kDefault_MaxEmptyPollsPerMinute = 10.0;
59
60         String kSetting_SleepMsOnRateLimit = "cambria.rateLimit.delay.ms";
61         String kSetting_SleepMsRealOnRateLimit = "cambria.rateLimitActual.delay.ms";
62         long kDefault_SleepMsOnRateLimit = Utils.getSleepMsForRate ( kDefault_MaxEmptyPollsPerMinute );
63
64         String kSetting_RateLimitWindowLength = "cambria.rateLimit.window.minutes";
65         int kDefault_RateLimitWindowLength = 5;
66
67         String kConfig = "c";
68
69         String kSetting_Port = "cambria.service.port";
70         /**
71          * value to use to signal default port
72          */
73         int kDefault_Port = 3904;
74
75         String kSetting_MaxThreads = "tomcat.maxthreads";
76         int kDefault_MaxThreads = -1;
77         
78         
79         
80         //String kDefault_TomcatProtocolClass = Http11NioProtocol.class.getName ();
81
82         String kSetting_ZkConfigDbServers = "config.zk.servers";
83         
84         /**
85          * value to indicate localhost port number
86          */
87         String kDefault_ZkConfigDbServers = "localhost:2181";
88
89         /**
90          * value to use to signal Session time out
91          */
92         String kSetting_ZkSessionTimeoutMs = "cambria.consumer.cache.zkSessionTimeout";
93         int kDefault_ZkSessionTimeoutMs = 20 * 1000;
94
95         /**
96          * value to use to signal connection time out 
97          */
98         String kSetting_ZkConnectionTimeoutMs = "cambria.consumer.cache.zkConnectionTimeout";
99         int kDefault_ZkConnectionTimeoutMs = 5 * 1000;
100
101         String TRANSACTION_ID_SEPARATOR = "::";
102
103         /**
104          * value to use to signal there's no timeout on the consumer request.
105          */
106         public static final int kNoTimeout = 10000;
107
108         /**
109          * value to use to signal no limit in the number of messages returned.
110          */
111         public static final int kNoLimit = 0;
112
113         /**
114          * value to use to signal that the caller wants the next set of events
115          */
116         public static final int kNextOffset = -1;
117
118         /**
119          * value to use to signal there's no filter on the response stream.
120          */
121         public static final String kNoFilter = "";
122
123         //Added for Metric publish
124         public static final int kStdCambriaServicePort = 3904;
125         public static final String kBasePath = "/events/";
126
127 }