diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2011-03-04 18:36:49 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2011-03-04 18:36:49 +0000 |
| commit | 466b4961c5d266f975aab0c962464d45c61893ac (patch) | |
| tree | 340220c839de2f8148b7a74733fe7456eac1708e /src | |
| parent | f5b3f8f1cdd34d734350bed84e5ab7a3a55544db (diff) | |
| download | rabbitmq-server-git-466b4961c5d266f975aab0c962464d45c61893ac.tar.gz | |
#basic_message.guid -> id
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 2 | ||||
| -rw-r--r-- | src/rabbit_basic.erl | 12 | ||||
| -rw-r--r-- | src/rabbit_types.erl | 2 | ||||
| -rw-r--r-- | src/rabbit_variable_queue.erl | 10 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 44053593b6..57426e13f1 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -433,7 +433,7 @@ record_confirm_message(#delivery{sender = ChPid, msg_seq_no = MsgSeqNo, message = #basic_message { is_persistent = true, - guid = Guid}}, + id = Guid}}, State = #q{guid_to_channel = GTC, q = #amqqueue{durable = true}}) -> diff --git a/src/rabbit_basic.erl b/src/rabbit_basic.erl index 57aad80888..43230f30d8 100644 --- a/src/rabbit_basic.erl +++ b/src/rabbit_basic.erl @@ -116,12 +116,12 @@ message(ExchangeName, RoutingKey, #content{properties = Props} = DecodedContent) -> try {ok, #basic_message{ - exchange_name = ExchangeName, - content = strip_header(DecodedContent, ?DELETED_HEADER), - guid = rabbit_guid:guid(), - is_persistent = is_message_persistent(DecodedContent), - routing_keys = [RoutingKey | - header_routes(Props#'P_basic'.headers)]}} + exchange_name = ExchangeName, + content = strip_header(DecodedContent, ?DELETED_HEADER), + id = rabbit_guid:guid(), + is_persistent = is_message_persistent(DecodedContent), + routing_keys = [RoutingKey | + header_routes(Props#'P_basic'.headers)]}} catch {error, _Reason} = Error -> Error end. diff --git a/src/rabbit_types.erl b/src/rabbit_types.erl index 899291f2cf..90dfd38d03 100644 --- a/src/rabbit_types.erl +++ b/src/rabbit_types.erl @@ -67,7 +67,7 @@ #basic_message{exchange_name :: rabbit_exchange:name(), routing_keys :: [rabbit_router:routing_key()], content :: content(), - guid :: msg_id(), + id :: msg_id(), is_persistent :: boolean()}). -type(message() :: basic_message()). -type(delivery() :: diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 1d32cec659..0c4c06e832 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -509,7 +509,7 @@ publish(Msg, MsgProps, State) -> {_SeqId, State1} = publish(Msg, MsgProps, false, false, State), a(reduce_memory_use(State1)). -publish_delivered(false, #basic_message { guid = MsgId }, +publish_delivered(false, #basic_message { id = MsgId }, #message_properties { needs_confirming = NeedsConfirming }, State = #vqstate { len = 0 }) -> @@ -519,7 +519,7 @@ publish_delivered(false, #basic_message { guid = MsgId }, end, {undefined, a(State)}; publish_delivered(true, Msg = #basic_message { is_persistent = IsPersistent, - guid = MsgId }, + id = MsgId }, MsgProps = #message_properties { needs_confirming = NeedsConfirming }, State = #vqstate { len = 0, @@ -909,7 +909,7 @@ gb_sets_maybe_insert(false, _Val, Set) -> Set; %% when requeueing, we re-add a msg_id to the unconfirmed set gb_sets_maybe_insert(true, Val, Set) -> gb_sets:add(Val, Set). -msg_status(IsPersistent, SeqId, Msg = #basic_message { guid = MsgId }, +msg_status(IsPersistent, SeqId, Msg = #basic_message { id = MsgId }, MsgProps) -> #msg_status { seq_id = SeqId, msg_id = MsgId, msg = Msg, is_persistent = IsPersistent, is_delivered = false, @@ -996,7 +996,7 @@ store_tx(Txn, Tx) -> put({txn, Txn}, Tx). erase_tx(Txn) -> erase({txn, Txn}). persistent_msg_ids(Pubs) -> - [MsgId || {#basic_message { guid = MsgId, + [MsgId || {#basic_message { id = MsgId, is_persistent = true }, _MsgProps} <- Pubs]. betas_from_index_entries(List, TransientThreshold, IndexState) -> @@ -1247,7 +1247,7 @@ sum_msg_ids_by_store_to_len(LensByStore, MsgIdsByStore) -> %% Internal gubbins for publishing %%---------------------------------------------------------------------------- -publish(Msg = #basic_message { is_persistent = IsPersistent, guid = MsgId }, +publish(Msg = #basic_message { is_persistent = IsPersistent, id = MsgId }, MsgProps = #message_properties { needs_confirming = NeedsConfirming }, IsDelivered, MsgOnDisk, State = #vqstate { q1 = Q1, q3 = Q3, q4 = Q4, |
