import Hub from "../hub"; import { MatchSpec } from "../match"; import Message from "../message"; import * as pubsub from "../pubsub"; export interface HeaderStoreOptions { persistent?: boolean; } /** * Selectively remember messages (per topic) based on the presence of certain * message headers. * * Behavior is determined by the `keep` header: * { keep: true } -> Store message, replacing previous message with same topic if any * { keep: false } -> Remove any stored message for this topic (and pass this one on) * { } -> Just pass message on, without impacting any stored message for this topic * * When a new Destination binds to this, all currently remembered topics are * sent to it. */ export declare class HeaderStore extends pubsub.BaseSource implements pubsub.Initializable { name: string; private _state; private _storage; private _options; constructor(name: string, options?: HeaderStoreOptions); init(hub: Hub): Promise; send(message: Message): void; bind(destination: pubsub.Destination, pattern?: MatchSpec): void; } export default HeaderStore;