Handling for dmaap not supporting offsets
Issue-ID: AAI-552
Change-Id: I0af737d92861b7c6c22421a106d32c9b2c4fca7b
Signed-off-by: Gurjeet Bedi <gurjeetb@amdocs.com>
} catch (Exception e) {
throw new CrudException("Error publishing request " + event.getTransactionId() + " Cause: " + e.getMessage(), Status.INTERNAL_SERVER_ERROR);
}
} catch (Exception e) {
throw new CrudException("Error publishing request " + event.getTransactionId() + " Cause: " + e.getMessage(), Status.INTERNAL_SERVER_ERROR);
}
+
+ logger.debug(CrudServiceMsgs.ASYNC_DATA_SERVICE_INFO, "Event Sent ="+event.toJson());
logger.info(CrudServiceMsgs.ASYNC_DATA_SERVICE_INFO,
"Event submitted of type: " + event.getObjectType() + " with key: " + event.getObjectKey()
logger.info(CrudServiceMsgs.ASYNC_DATA_SERVICE_INFO,
"Event submitted of type: " + event.getObjectType() + " with key: " + event.getObjectKey()
import java.util.TimerTask;
import java.util.TimerTask;
+import javax.naming.OperationNotSupportedException;
+
import org.onap.aai.cl.api.Logger;
import org.onap.aai.cl.eelf.LoggerFactory;
import org.onap.crud.event.GraphEvent;
import org.onap.aai.cl.api.Logger;
import org.onap.aai.cl.eelf.LoggerFactory;
import org.onap.crud.event.GraphEvent;
try {
asyncResponseConsumer.commitOffsets();
try {
asyncResponseConsumer.commitOffsets();
- } catch (Exception e) {
+ }
+ catch(OperationNotSupportedException e) {
+ //Dmaap doesnt support commit with offset
+ logger.debug(CrudServiceMsgs.ASYNC_RESPONSE_CONSUMER_ERROR, e.getMessage());
+ }
+ catch (Exception e) {
logger.error(CrudServiceMsgs.ASYNC_RESPONSE_CONSUMER_ERROR, e.getMessage());
}
logger.error(CrudServiceMsgs.ASYNC_RESPONSE_CONSUMER_ERROR, e.getMessage());
}