common/src/main/java/com/cognitree/kronos/queue/QueueService.java
/**
     * Send the task status in an ordered manner.
     *
     * @param taskStatusUpdate
     * @throws ServiceException
     */
Send the task status in an ordered manner.
Send the task status in an ordered manner .
public void send(TaskStatusUpdate taskStatusUpdate) throws ServiceException {
        logger.debug("Received request to send task status update {}", taskStatusUpdate);
        if (!producers.containsKey(taskStatusQueue)) {
            createProducer(taskStatusQueue);
        }
        try {
            producers.get(taskStatusQueue).sendInOrder(MAPPER.writeValueAsString(taskStatusUpdate),
                    getOrderingKey(taskStatusUpdate.getTaskId()));
        } catch (IOException e) {
            logger.error("Error serializing task status update {}", taskStatusUpdate, e);
        }
    }
public void send ( TaskStatusUpdate taskStatusUpdate ) throws ServiceException { logger . debug ( "Received request to send task status update {}" , taskStatusUpdate ) ; if ( ! producers . containsKey ( taskStatusQueue ) ) { createProducer ( taskStatusQueue ) ; } try { producers . get ( taskStatusQueue ) . sendInOrder ( MAPPER . writeValueAsString ( taskStatusUpdate ) , getOrderingKey ( taskStatusUpdate . getTaskId ( ) ) ) ; } catch ( IOException e ) { logger . error ( "Error serializing task status update {}" , taskStatusUpdate , e ) ; } }
Send the task status in an ordered manner.
Send the task status in an ordered manner .