Skip to content

Commit

Permalink
Remove queue purge during startup (whamcloud#2080)
Browse files Browse the repository at this point in the history
host plugins will need to deal with the data directly, otherwise
valid messages may be dropped.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
  • Loading branch information
jgrund authored and beevans committed Aug 6, 2020
1 parent 0da10e8 commit 4996e6a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions iml-services/iml-service-queue/src/service_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
// license that can be found in the LICENSE file.

use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt};
use iml_rabbit::{
basic_consume, connect_to_queue, purge_queue, BasicConsumeOptions, Channel, ImlRabbitError,
};
use iml_rabbit::{basic_consume, connect_to_queue, BasicConsumeOptions, Channel, ImlRabbitError};
use iml_wire_types::{Fqdn, PluginMessage};
use thiserror::Error;

Expand All @@ -18,8 +16,6 @@ pub enum ImlServiceQueueError {
}

/// Creates a consumer for an iml-service.
/// This fn will first purge the queue
/// and then consume from it.
///
/// This is expected to be called once during startup.
pub async fn consume_service_queue<'a>(
Expand All @@ -29,12 +25,8 @@ pub async fn consume_service_queue<'a>(
impl Stream<Item = Result<PluginMessage, ImlServiceQueueError>> + 'a,
ImlServiceQueueError,
> {
let name2 = name.to_string();

let q = connect_to_queue(name.to_string(), ch).await?;

purge_queue(ch, name2).await?;

let s = basic_consume(
ch,
q,
Expand Down

0 comments on commit 4996e6a

Please sign in to comment.