lib/src/main/java/edu/utexas/tacc/tapis/files/lib/services/TransfersService.java
public void publishBulkChildMessages(List<TransferTaskChild> children) {
        Flux<OutboundMessageResult> messages = sender.sendWithPublishConfirms(
            Flux.fromIterable(children)
                .flatMap(task -> {
                    try {
                        String m = mapper.writeValueAsString(task);
                        return Flux.just(new OutboundMessage(TRANSFERS_EXCHANGE, CHILD_QUEUE, m.getBytes(StandardCharsets.UTF_8)));
                    } catch (JsonProcessingException e) {
                        return Flux.empty();
                    }
                })
        );
        messages.subscribe();
    }
/**
     * Helper function to publish many child task messages at once.
     *
     * @param children A list of TransferTaskChild
     */
Helper function to publish many child task messages at once.
@param children A list of TransferTaskChild
Helper function to publish many child task messages at once . @param children A list of TransferTaskChild
public void publishBulkChildMessages(List<TransferTaskChild> children) {
        Flux<OutboundMessageResult> messages = sender.sendWithPublishConfirms(
            Flux.fromIterable(children)
                .flatMap(task -> {
                    try {
                        String m = mapper.writeValueAsString(task);
                        return Flux.just(new OutboundMessage(TRANSFERS_EXCHANGE, CHILD_QUEUE, m.getBytes(StandardCharsets.UTF_8)));
                    } catch (JsonProcessingException e) {
                        return Flux.empty();
                    }
                })
        );
        messages.subscribe();
    }
public void publishBulkChildMessages ( List < TransferTaskChild > children ) { Flux < OutboundMessageResult > messages = sender . sendWithPublishConfirms ( Flux . fromIterable ( children ) . flatMap ( task -> { try { String m = mapper . writeValueAsString ( task ) ; return Flux . just ( new OutboundMessage ( TRANSFERS_EXCHANGE , CHILD_QUEUE , m . getBytes ( StandardCharsets . UTF_8 ) ) ) ; } catch ( JsonProcessingException e ) { return Flux . empty ( ) ; } } ) ) ; messages . subscribe ( ) ; }
Helper function to publish many child task messages at once.
Helper function to publish many child task messages at once .