-#consumer.properties file created on the fly for topic:JunitTopicOne on:1542997120536\r
-#Fri Nov 23 13:18:40 EST 2018\r
-AFT_DME2_EP_CONN_TIMEOUT=15000\r
-MethodType=GET\r
-password=admin\r
-routeOffer=MR1\r
-DME2preferredRouterFilePath=JunitTopicOnepreferredRoute.properties\r
-Longitude=-100.000000\r
-username=admin\r
-Version=1.0\r
-group=junit-client\r
-timeout=15000\r
-SubContextPath=/\r
-authDate=2016-02-18T13\:57\:37-0800\r
-filter=none\r
-authKey=01234567890abcde\:01234567890abcdefghijklmn\r
-Environment=TEST\r
-host=192.168.10.10\r
-Protocol=http\r
-Partner=BOT_R\r
-contenttype=application/json\r
-id=junit-consumer-one\r
-Latitude=50.000000\r
-ServiceName=dmaap-v1.dev.dmaap.dt.saat.acsi.openecomp.org/events\r
-AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler\r
-AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler\r
-topic=JunitTopicOne\r
-TransportType=HTTPNOAUTH\r
-AFT_ENVIRONMENT=AFTUAT\r
-limit=1000\r
-AFT_DME2_EP_READ_TIMEOUT_MS=50000\r
-sessionstickinessrequired=NO\r
-AFT_DME2_REQ_TRACE_ON=true\r
-AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000\r
+#consumer.properties - This file is generated automatically for topic:JunitTopicOne on:1549243025739
+#Sun Feb 03 20:17:05 EST 2019
+AFT_DME2_EP_CONN_TIMEOUT=15000
+MethodType=GET
+password=admin
+routeOffer=MR1
+DME2preferredRouterFilePath=JunitTopicOnepreferredRoute.properties
+Longitude=-100.000000
+username=admin
+Version=1.0
+group=junit-client
+timeout=15000
+SubContextPath=/
+authDate=2016-02-18T13\:57\:37-0800
+filter=none
+authKey=01234567890abcde\:01234567890abcdefghijklmn
+Environment=TEST
+host=192.168.10.10
+Protocol=http
+Partner=BOT_R
+contenttype=application/json
+id=junit-consumer-one
+Latitude=50.000000
+ServiceName=dmaap-v1.dev.dmaap.dt.saat.acsi.openecomp.org/events
+AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler
+AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler
+topic=JunitTopicOne
+TransportType=HTTPNOAUTH
+AFT_ENVIRONMENT=AFTUAT
+limit=1000
+AFT_DME2_EP_READ_TIMEOUT_MS=50000
+sessionstickinessrequired=NO
+AFT_DME2_REQ_TRACE_ON=true
+AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000
-#consumer.properties file created on the fly for topic:JunitTopicOne on:1542997120526\r
-#Fri Nov 23 13:18:40 EST 2018\r
-AFT_DME2_EP_CONN_TIMEOUT=15000\r
-MethodType=GET\r
-routeOffer=MR1\r
-DME2preferredRouterFilePath=JunitTopicOnepreferredRoute.properties\r
-Longitude=-100.000000\r
-Version=1.0\r
-group=junit-client\r
-timeout=15000\r
-SubContextPath=/\r
-filter=none\r
-Environment=TEST\r
-host=192.168.10.10\r
-Protocol=http\r
-Partner=BOT_R\r
-contenttype=application/json\r
-Latitude=50.000000\r
-id=junit-consumer-two\r
-ServiceName=dmaap-v1.dev.dmaap.dt.saat.acsi.openecomp.org/events\r
-AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler\r
-AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler\r
-topic=JunitTopicOne\r
-TransportType=HTTPAAF\r
-AFT_ENVIRONMENT=AFTUAT\r
-limit=1000\r
-AFT_DME2_EP_READ_TIMEOUT_MS=50000\r
-sessionstickinessrequired=NO\r
-AFT_DME2_REQ_TRACE_ON=true\r
-AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000\r
+#consumer.properties - This file is generated automatically for topic:JunitTopicOne on:1549243025689
+#Sun Feb 03 20:17:05 EST 2019
+AFT_DME2_EP_CONN_TIMEOUT=15000
+MethodType=GET
+routeOffer=MR1
+DME2preferredRouterFilePath=JunitTopicOnepreferredRoute.properties
+Longitude=-100.000000
+Version=1.0
+group=junit-client
+timeout=15000
+SubContextPath=/
+filter=none
+Environment=TEST
+host=192.168.10.10
+Protocol=http
+Partner=BOT_R
+contenttype=application/json
+Latitude=50.000000
+id=junit-consumer-two
+ServiceName=dmaap-v1.dev.dmaap.dt.saat.acsi.openecomp.org/events
+AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler
+AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler
+topic=JunitTopicOne
+TransportType=HTTPAAF
+AFT_ENVIRONMENT=AFTUAT
+limit=1000
+AFT_DME2_EP_READ_TIMEOUT_MS=50000
+sessionstickinessrequired=NO
+AFT_DME2_REQ_TRACE_ON=true
+AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000
-#producer.properties file created on the fly for topic:JunitTopicOne on:1542997120515\r
-#Fri Nov 23 13:18:40 EST 2018\r
-AFT_DME2_EP_CONN_TIMEOUT=15000\r
-MethodType=POST\r
-password=admin\r
-DME2preferredRouterFilePath=JunitTopicOnepreferredRoute.properties\r
-Longitude=-100.000000\r
-username=admin\r
-partition=2\r
-Version=1.0\r
-maxBatchSize=100\r
-group=junit-client\r
-SubContextPath=/\r
-authDate=2016-07-20T11\:30\:56-0700\r
-filter=none\r
-authKey=01234567890abcde\:01234567890abcdefghijklmn\r
-Environment=TEST\r
-host=192.168.10.10\r
-Protocol=http\r
-Partner=BOT_R\r
-contenttype=application/json\r
-id=junit-producer-one\r
-Latitude=50.000000\r
-ServiceName=dmaap-v1.dev.dmaap.dt.saat.acsi.openecomp.org/events\r
-AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler\r
-AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler\r
-topic=JunitTopicOne\r
-TransportType=HTTPNOAUTH\r
-AFT_ENVIRONMENT=AFTUAT\r
-AFT_DME2_EP_READ_TIMEOUT_MS=50000\r
-sessionstickinessrequired=NO\r
-AFT_DME2_REQ_TRACE_ON=true\r
-AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000\r
-MessageSentThreadOccurance=50\r
-maxAgeMs=250\r
+#producer.properties - This file is generated automatically for topic:JunitTopicOne on:1549243025647
+#Sun Feb 03 20:17:05 EST 2019
+AFT_DME2_EP_CONN_TIMEOUT=15000
+MethodType=POST
+password=admin
+DME2preferredRouterFilePath=JunitTopicOnepreferredRoute.properties
+Longitude=-100.000000
+username=admin
+partition=2
+Version=1.0
+maxBatchSize=100
+group=junit-client
+SubContextPath=/
+authDate=2016-07-20T11\:30\:56-0700
+filter=none
+authKey=01234567890abcde\:01234567890abcdefghijklmn
+Environment=TEST
+host=192.168.10.10
+Protocol=http
+Partner=BOT_R
+contenttype=application/json
+id=junit-producer-one
+Latitude=50.000000
+ServiceName=dmaap-v1.dev.dmaap.dt.saat.acsi.openecomp.org/events
+AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler
+AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler
+topic=JunitTopicOne
+TransportType=HTTPNOAUTH
+AFT_ENVIRONMENT=AFTUAT
+AFT_DME2_EP_READ_TIMEOUT_MS=50000
+sessionstickinessrequired=NO
+AFT_DME2_REQ_TRACE_ON=true
+AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000
+MessageSentThreadOccurance=50
+maxAgeMs=250
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* ============LICENSE_END=========================================================
*/
@Override
public boolean post(String partition, String data) {
- LOG.debug("Entering HttpDmaapProducerImpl::: post ");
+ LOG.debug("Entering HttpDmaapProducerImpl::: post ");
long sent = 0;
try {
HttpPost request = postReq(null);
successful = true;
}
else {
- LOG.debug("HttpDmaapProducerImpl::: did not receive 200 for sendRequest");
+ LOG.debug("HttpDmaapProducerImpl::: did not receive 200 for sendRequest");
}
response.close();
} catch (Exception sendEx) {
return String.format("%d.%d.%s%s", prt.length(), msg.length(), prt, msg);
}
+
}
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* ============LICENSE_END=========================================================
*/
public boolean isHttps() {
return useHttps;
}
+
}
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@Override
public boolean post(String partition, String data) {
- LOG.debug("In DmaapProducerImpl.post()");
+ LOG.debug("In DmaapProducerImpl.post()");
boolean success = true;
Properties properties = configuration.getProperties();
if (properties != null && properties.getProperty("metric.enabled") != null) {
public boolean isHttps() {
return useHttps;
}
+
}
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
props.setProperty("preferredRouteKey", fileName);
topicPreferredRouteFileName = topic + "preferredRoute.properties";
props.store(new FileOutputStream(topicPreferredRouteFileName),
- "preferredRoute.properties file created on the fly for topic:" + topic + " on:"
+ "preferredRoute.properties -This file is generated automatically for topic:" + topic + " on:"
+ System.currentTimeMillis());
}
return topicPreferredRouteFileName;
: DELIMITER + topicConsumerPropFileName;
defaultProps.store(new FileOutputStream(topicConsumerPropFileName), defaultProfFileName
- + " file created on the fly for topic:" + topic + " on:" + System.currentTimeMillis());
+ + " - This file is generated automatically for topic:" + topic + " on:" + System.currentTimeMillis());
return topicConsumerPropFileName;
}
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
*/
default void useHttps(boolean yes) {}
+ /**
+ * Sets Blacklist time for a server with response problem in seconds
+ */
+ default void setResponseProblemBlacklistTime(String duration) {}
+
+ /**
+ * Sets Blacklist time for a server with server problem in seconds
+ */
+ default void setServerProblemBlacklistTime(String duration) {}
+
+ /**
+ * Sets Blacklist time for a server with DNS problem in seconds
+ */
+ default void setDnsIssueBlacklistTime(String duration) {}
+
+ /**
+ * Sets Blacklist time for a server with IO Exception problem in seconds
+ */
+ default void setIOExceptionBlacklistTime(String duration) {}
+
/**
* Closes the dmaap client https connection.
*/
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
*/
default void useHttps(boolean yes) {}
+ /**
+ * Sets Blacklist time for a server with response problem in seconds
+ */
+ default void setResponseProblemBlacklistTime(String duration) { }
+
+ /**
+ * Sets Blacklist time for a server with server problem in seconds
+ */
+ default void setServerProblemBlacklistTime(String duration) {}
+
+ /**
+ * Sets Blacklist time for a server with DNS problem in seconds
+ */
+ default void setDnsIssueBlacklistTime(String duration) {}
+
+ /**
+ * Sets Blacklist time for a server with IO Exception problem in seconds
+ */
+ default void setIOExceptionBlacklistTime(String duration) {}
+
+
/**
* Closes the dmaap client https connection.
*/
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* ============LICENSE_END=========================================================
*/
/**
* Gets a list of messages as Strings on the read topic.
- *
+ *
* @return A list of String messages. Never returns null.
*/
public List<String> getIncomingEvents();
/**
* Gets a list of messages as String on the read topic.
- *
+ *
* @param limit
* The maximum amount of entries to return
* @return A list of String messages. Never returns null.
/**
* Posts the String message to the write topic(s).
- *
+ *
* @param event
* The String to post.
*/
/**
* Set the client/group id used to read messages
- *
+ *
* @param clientId
* The new clientId to use
*/
/**
* Set the client/group name used to read messages.
- *
+ *
* @param clientName
* The new clientName to use
*/
/**
* Set the name of the topic to read from.
- *
+ *
* @param topic
* The new topic to read from
*/
/**
* Set the name of the topic to write to
- *
+ *
* @param topic
* The new topic to write to
*/
/**
* Adds a DMaaP host to the host pool
- *
+ *
* @param host
* The host to add to the pool in <host>:<port> format
*/
/**
* Remove the host name from the pool if it exists
- *
+ *
* @param host
* The host to add to the pool in <host>:<port> format
*/
/**
* Get all of the hosts in the DMaaP pool
- *
+ *
* @return A collection of host in <host>:<port> format
*/
public Collection<String> getPool();
*/
public void clearCredentials();
+ /**
+ * Sets Blacklist time for a server with response problem in seconds
+ */
+ void setResponseProblemBlacklistTime(String duration);
+
+ /**
+ * Sets Blacklist time for a server with server problem in seconds
+ */
+ void setServerProblemBlacklistTime(String duration);
+
+ /**
+ * Sets Blacklist time for a server with DNS problem in seconds
+ */
+ void setDnsIssueBlacklistTime(String duration);
+
+ /**
+ * Sets Blacklist time for a server with IO Exception problem in seconds
+ */
+ void setIOExceptionBlacklistTime(String duration);
/**
* Set the api credentials and make future requests as an authenticated user
- *
+ *
* @param access
* The access portion of the credentials (either user name or api key)
* @param secret
* The secret portion of the credentials (either password or api secret)
*/
+
+
public void setCredentials(String access, String secret);
-
+
/**
* Close consumer/producer DMaaP clients
*/
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* ============LICENSE_END=========================================================
*/
/**
* Returns a property matching a given KEYS
- *
+ *
* @param key
* The KEYS object who's value to return.
* @return The value of the property or null if none exists
/**
* Returns a property matching a given string.
- *
+ *
* @param key
* The key who's value to return.
* @return The value of the property or null if none exists
/**
* Returns a property matching a given KEYS
- *
+ *
* @param key
* The KEYS object who's value to return.
* @param defaultValue
/**
* Returns a property matching a given string.
- *
+ *
* @param key
* The key who's value to return.
* @param defaultValue
*/
TOPIC_READ_TIMEOUT("topic.read.timeout"),
+ /**
+ * Blacklist time for a server with response problem in seconds
+ */
+
+ PROBLEM_WITH_RESPONSE_BLACKLIST_TIME("topic.responseProblem.blacklistTime"),
+ /**
+ * Blacklist time for a server with server problem in seconds
+ */
+
+ PROBLEM_SERVERSIDE_ERROR_BLACKLIST_TIME("topic.serverError.blacklistTime"),
+ /**
+ * Blacklist time for a server with DNS problem in seconds
+ */
+
+ PROBLEM_DNS_BLACKLIST_TIME("topic.dnsIssue.blacklistTime"),
+ /**
+ * Blacklist time for a server with IO Exception problem in seconds
+ */
+
+ PROBLEM_IO_EXCEPTION_BLACKLIST_TIME("topic.ioException.blacklistTime"),
+
/**
* The name of the client to use. Should be unique to the application.
*/
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* ============LICENSE_END=========================================================
*/
*/
private String filter_json;
+
+ /*
+ * Blacklist time for a server with response problem in seconds
+ */
+ private String responseProblemBlacklistTime;
+
+ /*
+ * Blacklist time for a server with server problem in seconds
+ */
+ private String serverProblemBlacklistTime;
+
+ /*
+ * Blacklist time for a server with DNS problem in seconds
+ */
+ private String dnsIssueBlacklistTime;
+
+ /*
+ * Blacklist time for a server with IO Exception problem in seconds
+ */
+ private String ioExceptionBlacklistTime;
+
private MessageService messageService;
private Consumer reader = null;
clientId = props.getProperty(ListenerProperties.KEYS.CLIENT_ID, "0");
apiKey = props.getProperty(ListenerProperties.KEYS.AUTH_USER_KEY);
apiSecret = props.getProperty(ListenerProperties.KEYS.AUTH_SECRET_KEY);
+ responseProblemBlacklistTime = props.getProperty(ListenerProperties.KEYS.PROBLEM_WITH_RESPONSE_BLACKLIST_TIME);
+ serverProblemBlacklistTime = props.getProperty(ListenerProperties.KEYS.PROBLEM_SERVERSIDE_ERROR_BLACKLIST_TIME);
+ dnsIssueBlacklistTime = props.getProperty(ListenerProperties.KEYS.PROBLEM_DNS_BLACKLIST_TIME);
+ ioExceptionBlacklistTime = props.getProperty(ListenerProperties.KEYS.PROBLEM_IO_EXCEPTION_BLACKLIST_TIME);
filter_json = props.getProperty(ListenerProperties.KEYS.TOPIC_READ_FILTER);
try {
out = ((MessageAdapterFactory) ctx.getService(svcRef))
.createConsumer(pool, readTopic, clientName, clientId, filter_json, apiKey, apiSecret);
+
+ if (out != null && responseProblemBlacklistTime != null && responseProblemBlacklistTime.length() > 0)
+ {
+ out.setResponseProblemBlacklistTime(responseProblemBlacklistTime);
+ }
+
+ if (out != null && serverProblemBlacklistTime != null && serverProblemBlacklistTime.length() > 0)
+ {
+ out.setServerProblemBlacklistTime(serverProblemBlacklistTime);
+ }
+
+ if (out != null && dnsIssueBlacklistTime != null && dnsIssueBlacklistTime.length() > 0)
+ {
+ out.setDnsIssueBlacklistTime(dnsIssueBlacklistTime);
+ }
+
+ if (out != null && ioExceptionBlacklistTime != null && ioExceptionBlacklistTime.length() > 0)
+ {
+ out.setIOExceptionBlacklistTime(ioExceptionBlacklistTime);
+ }
} catch (Exception e) {
//TODO:create eelf message
LOG.error("EvenHandlerImp.getConsumer calling MessageAdapterFactor.createConsumer", e);
if (svcRef != null) {
out = ((MessageAdapterFactory) ctx.getService(svcRef))
.createProducer(pool, writeTopics, apiKey, apiSecret);
+ if (out != null && responseProblemBlacklistTime != null && responseProblemBlacklistTime.length() > 0)
+ {
+ out.setResponseProblemBlacklistTime(responseProblemBlacklistTime);
+ }
+
+ if (out != null && serverProblemBlacklistTime != null && serverProblemBlacklistTime.length() > 0)
+ {
+ out.setServerProblemBlacklistTime(serverProblemBlacklistTime);
+ }
+
+ if (out != null && dnsIssueBlacklistTime != null && dnsIssueBlacklistTime.length() > 0)
+ {
+ out.setDnsIssueBlacklistTime(dnsIssueBlacklistTime);
+ }
+
+ if (out != null && ioExceptionBlacklistTime != null && ioExceptionBlacklistTime.length() > 0)
+ {
+ out.setIOExceptionBlacklistTime(ioExceptionBlacklistTime);
+ }
if (out != null) {
for (String url : pool) {
if (url.contains("3905") || url.contains("https")) {
this.writeTopics = writeTopics;
}
+ @Override
+ public void setResponseProblemBlacklistTime(String duration){
+ this.responseProblemBlacklistTime = duration;
+ }
+
+ @Override
+ public void setServerProblemBlacklistTime(String duration){
+ this.serverProblemBlacklistTime = duration;
+ }
+
+ @Override
+ public void setDnsIssueBlacklistTime(String duration){
+ this.dnsIssueBlacklistTime = duration;
+ }
+
+ @Override
+ public void setIOExceptionBlacklistTime(String duration){
+ this.ioExceptionBlacklistTime = duration;
+ }
+
@Override
public void clearCredentials() {
apiKey = null;
* ============LICENSE_START=======================================================
* ONAP : APPC
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
@Test
public void testKeys() {
// Hardcode count so tests must be updated when values are added
- assertEquals(15, ListenerProperties.KEYS.values().length);
+ assertEquals(19, ListenerProperties.KEYS.values().length);
Properties tmp = new Properties();
try {
# ============LICENSE_START=======================================================
# ONAP : APPC
# ================================================================================
-# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Copyright (C) 2017 Amdocs
# =============================================================================
appc.ClosedLoop.threads.poolsize.min=1
appc.ClosedLoop.threads.poolsize.max=2
appc.ClosedLoop.provider.url=https://admin:password@localhost:8443/restconf/operations/appc-provider:topology-operation
-
+appc.ClosedLoop.topic.responseProblem.blacklistTime=60
+appc.ClosedLoop.topic.serverError.blacklistTime=60
+appc.ClosedLoop.topic.dnsIssue.blacklistTime=60
+appc.ClosedLoop.topic.ioException.blacklistTime=60