@Override public void open(Configuration parameters) throws Exception { super.open(parameters); sessionIds = new ArrayList<>(64); sessionIdsPerSnapshot = new ArrayDeque<>(); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); sessionIds = new ArrayList<>(64); sessionIdsPerSnapshot = new ArrayDeque<>(); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); sessionIds = new ArrayList<>(64); sessionIdsPerSnapshot = new ArrayDeque<>(); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); sessionIds = new ArrayList<>(64); sessionIdsPerSnapshot = new ArrayDeque<>(); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); final RuntimeContext context = getRuntimeContext(); if (context instanceof StreamingRuntimeContext) { isCheckpointingEnabled = ((StreamingRuntimeContext) context).isCheckpointingEnabled(); } client = createClient(); consumer = createConsumer(client); isRunning = true; }
@Override public void open(Configuration config) throws Exception { super.open(config); // Create a Connection connection = connectionFactory.createConnection(); connection.start(); exceptionListener = new AMQExceptionListener(LOG, logFailuresOnly); connection.setExceptionListener(exceptionListener); RuntimeContext runtimeContext = getRuntimeContext(); int acknowledgeType; if (runtimeContext instanceof StreamingRuntimeContext && ((StreamingRuntimeContext) runtimeContext).isCheckpointingEnabled()) { autoAck = false; acknowledgeType = ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE; } else { autoAck = true; acknowledgeType = ActiveMQSession.AUTO_ACKNOWLEDGE; } // Create a Session session = connection.createSession(false, acknowledgeType); // Create the destination (Topic or Queue) Destination destination = AMQUtil.getDestination(session, destinationType, destinationName); // Create a MessageConsumer from the Session to the Topic or // Queue consumer = session.createConsumer(destination); runningChecker.setIsRunning(true); }
@Override public void open(Configuration config) throws Exception { super.open(config); // Create a Connection connection = connectionFactory.createConnection(); connection.start(); exceptionListener = new AMQExceptionListener(LOG, logFailuresOnly); connection.setExceptionListener(exceptionListener); RuntimeContext runtimeContext = getRuntimeContext(); int acknowledgeType; if (runtimeContext instanceof StreamingRuntimeContext && ((StreamingRuntimeContext) runtimeContext).isCheckpointingEnabled()) { autoAck = false; acknowledgeType = ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE; } else { autoAck = true; acknowledgeType = ActiveMQSession.AUTO_ACKNOWLEDGE; } // Create a Session session = connection.createSession(false, acknowledgeType); // Create the destination (Topic or Queue) Destination destination = AMQUtil.getDestination(session, destinationType, destinationName); // Create a MessageConsumer from the Session to the Topic or // Queue consumer = session.createConsumer(destination); runningChecker.setIsRunning(true); }