anchor.diff:  %%
   %% Validation
   %%
  +
  +%% @private
  +ensure_headers(Headers, Frame) -> ensure_headers(Headers, Frame, []).
  +
  +%% @private
  +ensure_headers([], _Frame, Acc) ->
  +    {ok, lists:reverse(Acc)};
  +ensure_headers([H|T], Frame, Acc) ->
  +    case restomp:header(Frame, H) of
  +        {ok, Value} -> ensure_headers(T, Frame, [Value|Acc]);
  +        not_found   -> {error, missing_header, "Missing header: " ++ H}
  +    end.
   
   %% @private
   split_destination(Dest) ->
  
positive.code: 
  %% @private
  subscribe(Frame, State) ->
      Fun = fun(H) -> restomp:header(Frame, H) end,
      case {Fun("ack"), Fun("id"), Fun("destination")} of
          {{ok, "client"}, {ok, _Id}, {ok, Dest}} ->
              case split_destination(Dest) of
                  {queue, _Topic, _Queue} -> {noreply, State};
                  _Other                  -> send_error(invalid_destination, State)
              end;
          {_Ack, not_found, _Dest} ->
              send_error(no_id, State);
          {_Ack, _Id, _Dest} ->
              send_error(must_set_ack_client, State)
      end.
  
  %% @private
  
negative.code: 
  %% @private
  ack(Frame, State) ->
      case ensure_headers(["message-id", "subscription"], Frame) of
          {ok, [_Id, _Sub]} ->
              {noreply, State};
          {error, Msg, Detail} ->
              send_error(Msg, Detail, State)
      end.
  
  %% @private
  nack(Frame, State) ->
      case ensure_headers(["message-id", "subscription"], Frame) of
          {ok, [_Id, _Sub]} ->
              {noreply, State};
          {error, Msg, Detail} ->
              send_error(Msg, Detail, State)
      end.
  
  %% @private
  