Does disruptor crate support Async?

I attempted to test disruptor(disruptor - Rust), but I wonder the crate supports asynchronous. I try to using it at process_flume1_data() like below.

main() {
    let producer = Builder::new(
        move |id_with_message, seq, end_of_batch| {
            processor(id_with_message, seq, end_of_batch, &mut processor_args); 

    tokio::spawn(process_flume1_data(rx, producer, request_vec, tokenizer.clone()).map(|_| ()));

async fn handle_request(
    req: Request<Body>,
    tx: Sender<IdWithMessage>,
    vec_queue: Arc<Mutex<VecDeque<IdWithMessage>>>,
) -> Result<Response<Body>, hyper::Error> {
            .expect("Failed to send data through Flume channel");
        println!("sent to channel1.");

async fn process_flume1_data(
    rx: Receiver<IdWithMessage>,
    // tx2: Sender<SessionIdsWithTokens>,
    mut producer: MultiProducer<IdWithMessage>,
    request_vec: Arc<RwLock<Vec<IdWithMessage>>>,
    mut tokenizer: tokenizers::Tokenizer,
) {

    while let std::result::Result::Ok(request_message) = rx.recv_async().await {
        producer.publish(|e| {
            *e = request_message;

fn processor(
    id_with_tokens: &IdWithMessage,
    seq: i64,
    end_of_batch: bool,
    processor_args: &mut ProcessorArgs,
) {
    println!("end_of_batch : {:?}", end_of_batch);

I sent a request to the listener, and the printed value is true. I think false should be returned until seq is 8 but the printed value was always true. How can I resolve this? Does this crate not support asynchronous?

Please add links to other posts you've made elsewhere to avoid duplicated effort by the community:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.