1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00
nats.docs/docs/nats_streaming/nats-streaming-protocol.html
Alberto Ricart a1c12370c2 dead links
2019-05-20 17:01:44 -05:00

2526 lines
72 KiB
HTML

<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Protocol ยท NATS</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<meta name="author" content="The NATS Maintainers">
<link rel="stylesheet" href="../gitbook/style.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-toggle-chapters/toggle.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="nats-streaming-swarm.html" />
<link rel="prev" href="nats-streaming-tls.html" />
<link rel="stylesheet" href="https://cdn.materialdesignicons.com/3.6.95/css/materialdesignicons.min.css">
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="../">
<a href="../">
Introduction
</a>
</li>
<li class="chapter " data-level="1.2" data-path="../whats_new/whats_new_20.html">
<a href="../whats_new/whats_new_20.html">
What's New in 2.0
</a>
</li>
<li class="header">NATS Server</li>
<li class="chapter " data-level="2.1" data-path="../nats_server/installation.html">
<a href="../nats_server/installation.html">
Installing
</a>
</li>
<li class="chapter " data-level="2.2" data-path="../nats_server/running.html">
<a href="../nats_server/running.html">
Running
</a>
<ul class="articles">
<li class="chapter " data-level="2.2.1" data-path="../nats_server/windows_srv.html">
<a href="../nats_server/windows_srv.html">
Window Service
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="2.3" data-path="../nats_server/clients.html">
<a href="../nats_server/clients.html">
Clients
</a>
</li>
<li class="chapter " data-level="2.4" data-path="../nats_server/flags.html">
<a href="../nats_server/flags.html">
Flags
</a>
</li>
<li class="chapter " data-level="2.5" data-path="../nats_server/configuration.html">
<a href="../nats_server/configuration.html">
Configuration
</a>
<ul class="articles">
<li class="chapter " data-level="2.5.1" data-path="../nats_server/securing_nats.html">
<a href="../nats_server/securing_nats.html">
Securing NATS
</a>
<ul class="articles">
<li class="chapter " data-level="2.5.1.1" data-path="../nats_server/tls.html">
<a href="../nats_server/tls.html">
Enabling TLS
</a>
</li>
<li class="chapter " data-level="2.5.1.2" data-path="../nats_server/auth_intro.html">
<a href="../nats_server/auth_intro.html">
Authentication
</a>
<ul class="articles">
<li class="chapter " data-level="2.5.1.2.1" data-path="../nats_server/tokens.html">
<a href="../nats_server/tokens.html">
Tokens
</a>
</li>
<li class="chapter " data-level="2.5.1.2.2" data-path="../nats_server/username_password.html">
<a href="../nats_server/username_password.html">
Username/Password
</a>
</li>
<li class="chapter " data-level="2.5.1.2.3" data-path="../nats_server/tls_mutual_auth.html">
<a href="../nats_server/tls_mutual_auth.html">
TLS Authentication
</a>
</li>
<li class="chapter " data-level="2.5.1.2.4" data-path="../nats_server/nkey_auth.html">
<a href="../nats_server/nkey_auth.html">
NKeys
</a>
</li>
<li class="chapter " data-level="2.5.1.2.5" data-path="../nats_server/jwt_auth.html">
<a href="../nats_server/jwt_auth.html">
Accounts
</a>
</li>
<li class="chapter " data-level="2.5.1.2.6" data-path="../nats_server/auth_timeout.html">
<a href="../nats_server/auth_timeout.html">
Authentication Timeout
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="2.5.1.3" data-path="../nats_server/authorization.html">
<a href="../nats_server/authorization.html">
Authorization
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="2.5.2" data-path="../nats_server/clustering.html">
<a href="../nats_server/clustering.html">
Clustering
</a>
<ul class="articles">
<li class="chapter " data-level="2.5.2.1" data-path="../nats_server/cluster_config.html">
<a href="../nats_server/cluster_config.html">
Configuration
</a>
</li>
<li class="chapter " data-level="2.5.2.2" data-path="../nats_server/cluster_tls.html">
<a href="../nats_server/cluster_tls.html">
TLS Authentication
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="2.5.3" data-path="../gateways/">
<a href="../gateways/">
Gateways
</a>
<ul class="articles">
<li class="chapter " data-level="2.5.3.1" data-path="../gateways/gateway.html">
<a href="../gateways/gateway.html">
Configuration
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="2.5.4" data-path="../leafnodes/">
<a href="../leafnodes/">
Leaf Nodes
</a>
<ul class="articles">
<li class="chapter " data-level="2.5.4.1" data-path="../leafnodes/leafnode_conf.html">
<a href="../leafnodes/leafnode_conf.html">
Configuration
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="2.5.5" data-path="../nats_server/logging.html">
<a href="../nats_server/logging.html">
Logging
</a>
</li>
<li class="chapter " data-level="2.5.6" data-path="../nats_server/monitoring.html">
<a href="../nats_server/monitoring.html">
Monitoring
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="2.6" data-path="../nats_admin/">
<a href="../nats_admin/">
Managing A NATS Server
</a>
<ul class="articles">
<li class="chapter " data-level="2.6.1" data-path="../nats_admin/upgrading_cluster.html">
<a href="../nats_admin/upgrading_cluster.html">
Upgrading a Cluster
</a>
</li>
<li class="chapter " data-level="2.6.2" data-path="../nats_admin/slow_consumers.html">
<a href="../nats_admin/slow_consumers.html">
Slow Consumers
</a>
</li>
<li class="chapter " data-level="2.6.3" data-path="../nats_admin/signals.html">
<a href="../nats_admin/signals.html">
Signals
</a>
</li>
<li class="chapter " data-level="2.6.4" data-path="../sys_accounts/">
<a href="../sys_accounts/">
System Accounts
</a>
<ul class="articles">
<li class="chapter " data-level="2.6.4.1" data-path="../sys_accounts/sys_accounts.html">
<a href="../sys_accounts/sys_accounts.html">
Configuration
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="chapter " data-level="2.7" data-path="../nats_docker/">
<a href="../nats_docker/">
NATS and Docker
</a>
<ul class="articles">
<li class="chapter " data-level="2.7.1" data-path="../nats_docker/tutorial.html">
<a href="../nats_docker/tutorial.html">
Tutorial
</a>
</li>
<li class="chapter " data-level="2.7.2" data-path="../nats_docker/docker_swarm.html">
<a href="../nats_docker/docker_swarm.html">
Docker Swarm
</a>
</li>
</ul>
</li>
<li class="header">NATS Streaming Server</li>
<li class="chapter " data-level="3.1" data-path="nats-streaming-intro.html">
<a href="nats-streaming-intro.html">
Basics
</a>
</li>
<li class="chapter " data-level="3.2" data-path="nats-streaming-install.html">
<a href="nats-streaming-install.html">
Installing
</a>
<ul class="articles">
<li class="chapter " data-level="3.2.1" data-path="nats-streaming-tls.html">
<a href="nats-streaming-tls.html">
Securing
</a>
</li>
</ul>
</li>
<li class="chapter active" data-level="3.3" data-path="nats-streaming-protocol.html">
<a href="nats-streaming-protocol.html">
Protocol
</a>
</li>
<li class="chapter " data-level="3.4" data-path="nats-streaming-swarm.html">
<a href="nats-streaming-swarm.html">
Docker Swarm
</a>
</li>
<li class="header">NATS Tools</li>
<li class="chapter " data-level="4.1" data-path="../nats_tools/mkpasswd.html">
<a href="../nats_tools/mkpasswd.html">
mkpasswd
</a>
</li>
<li class="chapter " data-level="4.2" data-path="../nats_tools/nk.html">
<a href="../nats_tools/nk.html">
nk
</a>
</li>
<li class="chapter " data-level="4.3" data-path="../nats_tools/nsc/">
<a href="../nats_tools/nsc/">
nsc
</a>
<ul class="articles">
<li class="chapter " data-level="4.3.1" data-path="../nats_tools/nsc/nsc.html">
<a href="../nats_tools/nsc/nsc.html">
Basics
</a>
</li>
<li class="chapter " data-level="4.3.2" data-path="../nats_tools/nsc/streams.html">
<a href="../nats_tools/nsc/streams.html">
Streams
</a>
</li>
<li class="chapter " data-level="4.3.3" data-path="../nats_tools/nsc/services.html">
<a href="../nats_tools/nsc/services.html">
Services
</a>
</li>
<li class="chapter " data-level="4.3.4" data-path="../nats_tools/nsc/signing_keys.html">
<a href="../nats_tools/nsc/signing_keys.html">
Signing Keys
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="4.4" data-path="../nats_tools/nas/">
<a href="../nats_tools/nas/">
nats-account-server
</a>
<ul class="articles">
<li class="chapter " data-level="4.4.1" data-path="../nats_tools/nas/nas_conf.html">
<a href="../nats_tools/nas/nas_conf.html">
Basics
</a>
</li>
<li class="chapter " data-level="4.4.2" data-path="../nats_tools/nas/inspecting_jwts.html">
<a href="../nats_tools/nas/inspecting_jwts.html">
Inspecting JWTs
</a>
</li>
<li class="chapter " data-level="4.4.3" data-path="../nats_tools/nas/mem_resolver.html">
<a href="../nats_tools/nas/mem_resolver.html">
Memory Resolver
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="4.5" data-path="../nats_tools/nats_top/">
<a href="../nats_tools/nats_top/">
nats-top
</a>
<ul class="articles">
<li class="chapter " data-level="4.5.1" data-path="../nats_tools/nats_top/tutorial.html">
<a href="../nats_tools/nats_top/tutorial.html">
Tutorial
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="4.6" data-path="../nats_tools/natsbench.html">
<a href="../nats_tools/natsbench.html">
nats-bench
</a>
</li>
<li class="header">Developing With NATS</li>
<li class="chapter " data-level="5.1" data-path="../developer/">
<a href="../developer/">
Introduction
</a>
</li>
<li class="chapter " data-level="5.2" data-path="../developer/concepts/intro.html">
<a href="../developer/concepts/intro.html">
Concepts
</a>
<ul class="articles">
<li class="chapter " data-level="5.2.1" data-path="../developer/concepts/subjects.html">
<a href="../developer/concepts/subjects.html">
Subject-Based Messaging
</a>
</li>
<li class="chapter " data-level="5.2.2" data-path="../developer/concepts/pubsub.html">
<a href="../developer/concepts/pubsub.html">
Publish-Subscribe
</a>
</li>
<li class="chapter " data-level="5.2.3" data-path="../developer/concepts/reqreply.html">
<a href="../developer/concepts/reqreply.html">
Request-Reply
</a>
</li>
<li class="chapter " data-level="5.2.4" data-path="../developer/concepts/queue.html">
<a href="../developer/concepts/queue.html">
Queue Groups
</a>
</li>
<li class="chapter " data-level="5.2.5" data-path="../developer/concepts/acks.html">
<a href="../developer/concepts/acks.html">
Acknowledgements
</a>
</li>
<li class="chapter " data-level="5.2.6" data-path="../developer/concepts/seq_num.html">
<a href="../developer/concepts/seq_num.html">
Sequence Numbers
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.3" data-path="../developer/connecting/intro.html">
<a href="../developer/connecting/intro.html">
Connecting
</a>
<ul class="articles">
<li class="chapter " data-level="5.3.1" data-path="../developer/connecting/default_server.html">
<a href="../developer/connecting/default_server.html">
Connecting to the Default Server
</a>
</li>
<li class="chapter " data-level="5.3.2" data-path="../developer/connecting/specific_server.html">
<a href="../developer/connecting/specific_server.html">
Connecting to a Specific Server
</a>
</li>
<li class="chapter " data-level="5.3.3" data-path="../developer/connecting/cluster.html">
<a href="../developer/connecting/cluster.html">
Connecting to a Cluster
</a>
</li>
<li class="chapter " data-level="5.3.4" data-path="../developer/connecting/connect_timeout.html">
<a href="../developer/connecting/connect_timeout.html">
Setting a Connect Timeout
</a>
</li>
<li class="chapter " data-level="5.3.5" data-path="../developer/connecting/pingpong.html">
<a href="../developer/connecting/pingpong.html">
Ping/Pong Protocol
</a>
</li>
<li class="chapter " data-level="5.3.6" data-path="../developer/connecting/protocol.html">
<a href="../developer/connecting/protocol.html">
Controlling the Client/Server Protocol
</a>
</li>
<li class="chapter " data-level="5.3.7" data-path="../developer/connecting/noecho.html">
<a href="../developer/connecting/noecho.html">
Turning Off Echo'd Messages
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.4" data-path="../developer/reconnect/intro.html">
<a href="../developer/reconnect/intro.html">
Automatic Reconnections
</a>
<ul class="articles">
<li class="chapter " data-level="5.4.1" data-path="../developer/reconnect/disable.html">
<a href="../developer/reconnect/disable.html">
Disabling Reconnect
</a>
</li>
<li class="chapter " data-level="5.4.2" data-path="../developer/reconnect/max.html">
<a href="../developer/reconnect/max.html">
Set the Number of Reconnect Attempts
</a>
</li>
<li class="chapter " data-level="5.4.3" data-path="../developer/reconnect/wait.html">
<a href="../developer/reconnect/wait.html">
Pausing Between Reconnect Attempts
</a>
</li>
<li class="chapter " data-level="5.4.4" data-path="../developer/reconnect/random.html">
<a href="../developer/reconnect/random.html">
Avoiding the Thundering Herd
</a>
</li>
<li class="chapter " data-level="5.4.5" data-path="../developer/reconnect/events.html">
<a href="../developer/reconnect/events.html">
Listening for Reconnect Events
</a>
</li>
<li class="chapter " data-level="5.4.6" data-path="../developer/reconnect/buffer.html">
<a href="../developer/reconnect/buffer.html">
Buffering Messages During Reconnect Attempts
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.5" data-path="../developer/security/intro.html">
<a href="../developer/security/intro.html">
Securing Connections
</a>
<ul class="articles">
<li class="chapter " data-level="5.5.1" data-path="../developer/security/userpass.html">
<a href="../developer/security/userpass.html">
Authenticating with a User and Password
</a>
</li>
<li class="chapter " data-level="5.5.2" data-path="../developer/security/token.html">
<a href="../developer/security/token.html">
Authenticating with a Token
</a>
</li>
<li class="chapter " data-level="5.5.3" data-path="../developer/security/nkey.html">
<a href="../developer/security/nkey.html">
Authenticating with an NKey
</a>
</li>
<li class="chapter " data-level="5.5.4" data-path="../developer/security/creds.html">
<a href="../developer/security/creds.html">
Authenticating with a Credentials File
</a>
</li>
<li class="chapter " data-level="5.5.5" data-path="../developer/security/tls.html">
<a href="../developer/security/tls.html">
Encrypting Connections with TLS
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.6" data-path="../developer/receiving/intro.html">
<a href="../developer/receiving/intro.html">
Receiving Messages
</a>
<ul class="articles">
<li class="chapter " data-level="5.6.1" data-path="../developer/receiving/sync.html">
<a href="../developer/receiving/sync.html">
Synchronous Subscriptions
</a>
</li>
<li class="chapter " data-level="5.6.2" data-path="../developer/receiving/async.html">
<a href="../developer/receiving/async.html">
Asynchronous Subscriptions
</a>
</li>
<li class="chapter " data-level="5.6.3" data-path="../developer/receiving/unsubscribing.html">
<a href="../developer/receiving/unsubscribing.html">
Unsubscribing
</a>
</li>
<li class="chapter " data-level="5.6.4" data-path="../developer/receiving/unsub_after.html">
<a href="../developer/receiving/unsub_after.html">
Unsubscribing After N Messages
</a>
</li>
<li class="chapter " data-level="5.6.5" data-path="../developer/receiving/reply.html">
<a href="../developer/receiving/reply.html">
Replying to a Message
</a>
</li>
<li class="chapter " data-level="5.6.6" data-path="../developer/receiving/wildcards.html">
<a href="../developer/receiving/wildcards.html">
Wildcard Subscriptions
</a>
</li>
<li class="chapter " data-level="5.6.7" data-path="../developer/receiving/queues.html">
<a href="../developer/receiving/queues.html">
Queue Subscriptions
</a>
</li>
<li class="chapter " data-level="5.6.8" data-path="../developer/receiving/drain.html">
<a href="../developer/receiving/drain.html">
Draining Messages Before Disconnect
</a>
</li>
<li class="chapter " data-level="5.6.9" data-path="../developer/receiving/structure.html">
<a href="../developer/receiving/structure.html">
Structured Data
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.7" data-path="../developer/sending/intro.html">
<a href="../developer/sending/intro.html">
Sending Messages
</a>
<ul class="articles">
<li class="chapter " data-level="5.7.1" data-path="../developer/sending/replyto.html">
<a href="../developer/sending/replyto.html">
Including a Reply Subject
</a>
</li>
<li class="chapter " data-level="5.7.2" data-path="../developer/sending/request_reply.html">
<a href="../developer/sending/request_reply.html">
Request-Reply Semantics
</a>
</li>
<li class="chapter " data-level="5.7.3" data-path="../developer/sending/caches.html">
<a href="../developer/sending/caches.html">
Caches, Flush and Ping
</a>
</li>
<li class="chapter " data-level="5.7.4" data-path="../developer/sending/structure.html">
<a href="../developer/sending/structure.html">
Sending Structured Data
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.8" data-path="../developer/events/intro.html">
<a href="../developer/events/intro.html">
Monitoring the Connection
</a>
<ul class="articles">
<li class="chapter " data-level="5.8.1" data-path="../developer/events/events.html">
<a href="../developer/events/events.html">
Listen for Connection Events
</a>
</li>
<li class="chapter " data-level="5.8.2" data-path="../developer/events/slow.html">
<a href="../developer/events/slow.html">
Slow Consumers
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="5.9" data-path="../developer/tutorials/intro.html">
<a href="../developer/tutorials/intro.html">
Tutorials
</a>
<ul class="articles">
<li class="chapter " data-level="5.9.1" data-path="../developer/tutorials/pubsub.html">
<a href="../developer/tutorials/pubsub.html">
Explore NATS Pub/Sub
</a>
</li>
<li class="chapter " data-level="5.9.2" data-path="../developer/tutorials/reqreply.html">
<a href="../developer/tutorials/reqreply.html">
Explore NATS Request/Reply
</a>
</li>
<li class="chapter " data-level="5.9.3" data-path="../developer/tutorials/queues.html">
<a href="../developer/tutorials/queues.html">
Explore NATS Queueing
</a>
</li>
<li class="chapter " data-level="5.9.4" data-path="../developer/tutorials/custom_dialer.html">
<a href="../developer/tutorials/custom_dialer.html">
Advanced Connect and Custom Dialer in Go
</a>
</li>
</ul>
</li>
<li class="header">Developing With NATS Streaming</li>
<li class="chapter " data-level="6.1" data-path="../developer/streaming/">
<a href="../developer/streaming/">
Introduction
</a>
</li>
<li class="chapter " data-level="6.2" data-path="../developer/streaming/connecting.html">
<a href="../developer/streaming/connecting.html">
Connecting to NATS Streaming
</a>
</li>
<li class="chapter " data-level="6.3" data-path="../developer/streaming/publishing.html">
<a href="../developer/streaming/publishing.html">
Publishing to a Channel
</a>
</li>
<li class="chapter " data-level="6.4" data-path="../developer/streaming/receiving.html">
<a href="../developer/streaming/receiving.html">
Receiving Messages from a Channel
</a>
</li>
<li class="chapter " data-level="6.5" data-path="../developer/streaming/durables.html">
<a href="../developer/streaming/durables.html">
Durable Subscriptions
</a>
</li>
<li class="chapter " data-level="6.6" data-path="../developer/streaming/queues.html">
<a href="../developer/streaming/queues.html">
Queue Subscriptions
</a>
</li>
<li class="chapter " data-level="6.7" data-path="../developer/streaming/acks.html">
<a href="../developer/streaming/acks.html">
Acknowledgements
</a>
</li>
<li class="header">NATS Protocol</li>
<li class="chapter " data-level="7.1" data-path="../nats_protocol/nats-protocol-demo.html">
<a href="../nats_protocol/nats-protocol-demo.html">
Protocol Demo
</a>
</li>
<li class="chapter " data-level="7.2" data-path="../nats_protocol/nats-protocol.html">
<a href="../nats_protocol/nats-protocol.html">
Client Protocol
</a>
<ul class="articles">
<li class="chapter " data-level="7.2.1" data-path="../nats_protocol/nats-client-dev.html">
<a href="../nats_protocol/nats-client-dev.html">
Developing a Client
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="7.3" data-path="../nats_protocol/nats-server-protocol.html">
<a href="../nats_protocol/nats-server-protocol.html">
NATS Cluster Protocol
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href=".." >Protocol</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="nats-streaming-protocol">NATS Streaming Protocol</h1>
<p>The NATS streaming protocol sits atop the core <a href="../documentation/internals/nats-protocol">NATS protocol</a> and uses <a href="https://developers.google.com/protocol-buffers/" target="_blank">Google&apos;s Protocol Buffers</a>. Protocol buffer messages are marshaled into bytes and published as NATS messages on specific subjects described below. In communicating with the NATS Streaming Server, the NATS <a href="../documentation/writing_applications/concepts">request/reply</a> pattern is used for all protocol messages that have a corresponding reply.</p>
<h2 id="nats-streaming-protocol-conventions">NATS streaming protocol conventions</h2>
<p><strong>Subject names</strong>: Subject names, including reply subject (INBOX) names, are case-sensitive and must be non-empty alphanumeric strings with no embedded whitespace, and optionally token-delimited using the dot character (<code>.</code>), e.g.:</p>
<p><code>FOO</code>, <code>BAR</code>, <code>foo.bar</code>, <code>foo.BAR</code>, <code>FOO.BAR</code> and <code>FOO.BAR.BAZ</code> are all valid subject names</p>
<p><code>FOO. BAR</code>, <code>foo. .bar</code> and<code>foo..bar</code> are *not- valid subject names</p>
<p><strong>Wildcards</strong>: NATS streaming does <em>*not</em>- support wildcards in subject subscriptions</p>
<p><strong>Protocol definition</strong>: The fields of NATS streaming protocol messages are defined in the go-nats-streaming <a href="https://github.com/nats-io/go-nats-streaming/blob/master/pb/protocol.proto" target="_blank">protocol file</a>.</p>
<h2 id="nats-streaming-protocol-messages">NATS streaming protocol messages</h2>
<p>The following table briefly describes the NATS streaming protocol messages.</p>
<p>Click the name to see more detailed information, including usage:</p>
<table>
<thead>
<tr>
<th>Message Name</th>
<th style="text-align:left">Sent By</th>
<th style="text-align:left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#CONNREQ"><code>ConnectRequest</code></a></td>
<td style="text-align:left">Client</td>
<td style="text-align:left">Request to connect to the NATS Streaming Server</td>
</tr>
<tr>
<td><a href="#CONNRESP"><code>ConnectResponse</code></a></td>
<td style="text-align:left">Server</td>
<td style="text-align:left">Result of a connection request</td>
</tr>
<tr>
<td><a href="#SUBREQ"><code>SubscriptionRequest</code></a></td>
<td style="text-align:left">Client</td>
<td style="text-align:left">Request sent to subscribe and retrieve data</td>
</tr>
<tr>
<td><a href="#SUBRESP"><code>SubscriptionResponse</code></a></td>
<td style="text-align:left">Server</td>
<td style="text-align:left">Result of a subscription request</td>
</tr>
<tr>
<td><a href="#UNSUBREQ"><code>UnsubscribeRequest</code></a></td>
<td style="text-align:left">Client</td>
<td style="text-align:left">Unsubscribe from a subject</td>
</tr>
<tr>
<td><a href="#PUBMSG"><code>PubMsg</code></a></td>
<td style="text-align:left">Client</td>
<td style="text-align:left">Publish a message to a subject, with optional reply subject</td>
</tr>
<tr>
<td><a href="#PUBACK"><code>PubAck</code></a></td>
<td style="text-align:left">Server</td>
<td style="text-align:left">An acknowledgement that a published message has been processed on the server</td>
</tr>
<tr>
<td><a href="#MSGPROTO"><code>MsgProto</code></a></td>
<td style="text-align:left">Server</td>
<td style="text-align:left">A message from the NATS Streaming Server to a subscribing client</td>
</tr>
<tr>
<td><a href="#ACK"><code>Ack</code></a></td>
<td style="text-align:left">Client</td>
<td style="text-align:left">Acknowledges that a message has been received</td>
</tr>
<tr>
<td><a href="#CLOSEREQ"><code>CloseRequest</code></a></td>
<td style="text-align:left">Client</td>
<td style="text-align:left">Request sent to close the connection to the NATS Streaming Server</td>
</tr>
<tr>
<td><a href="#CLOSERESP"><code>CloseResp</code></a></td>
<td style="text-align:left">Server</td>
<td style="text-align:left">Result of the close request</td>
</tr>
</tbody>
</table>
<p>The following sections explain each protocol message.</p>
<h2 id="connectrequest"><a name="CONNREQ"></a>ConnectRequest</h2>
<h4 id="description">Description</h4>
<p>A connection request is sent when a streaming client connects to the NATS Streaming Server. The connection request contains a unique identifier representing the client, and an inbox subject the client will listen on for incoming heartbeats. The identifier <em>*must</em>- be unique; a connection attempt with an identifier currently in use will fail. The inbox subject is the subject where the client receives incoming heartbeats, and responds by publishing an empty NATS message to the reply subject, indicating it is alive. The NATS Streaming Server will return a <a href="#CONNRESP">ConnectResponse</a> message to the reply subject specified in the NATS request message.</p>
<p>This request is published to a subject comprised of the <code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>discover-prefix</span><span class="token punctuation">&gt;</span></span>.cluster-id</code>, for example, if a NATS Streaming Server was started with a cluster-id of <code>mycluster</code>, and the default prefix was used, the client publishes to <code>_STAN.discover.mycluster</code></p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>clientID</code>: A unique identifier for a client</li>
<li><code>heartbeatInbox</code>: An inbox to which the NATS Streaming Server will send heartbeats for the client to process</li>
</ul>
<h2 id="connectresponse"><a name="CONNRESP"></a>ConnectResponse</h2>
<h4 id="description">Description</h4>
<p>After a <code>ConnectRequest</code> is published, the NATS Streaming Server responds with this message on the reply subject of the underlying NATS request. The NATS Streaming Server requires the client to make requests and publish messages on certain subjects (described above), and when a connection is successful, the client saves the information returned to be used in sending other NATS streaming protocol messages. In the event the connection was not successful, an error is returned in the <code>error</code> field.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>pubPrefix</code>: Prefix to use when publishing</li>
<li><code>subRequests</code>: Subject used for subscription requests</li>
<li><code>unsubRequests</code>: Subject used for unsubscribe requests</li>
<li><code>closeRequests</code>: Subject for closing a connection</li>
<li><code>error</code>: An error string, which will be empty/omitted upon success</li>
<li><code>publicKey</code>: Reserved for future use</li>
</ul>
<h2 id="subscriptionrequest"><a name="SUBREQ"></a>SubscriptionRequest</h2>
<h4 id="description">Description</h4>
<p>A <code>SubscriptionRequest</code> is published on the subject returned in the <code>subRequests</code> field of a <a href="#CONNRESP"><code>ConnectResponse</code></a>, and creates a subscription to a subject on the NATS Streaming Server. This will return a <a href="#SUBRESP">SubscriptionResponse</a> message to the reply subject specified in the NATS protocol request message.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>clientID</code>: Client ID originally provided in the <a href="#CONNREQ">ConnectRequest</a></li>
<li><code>subject</code>: Formal subject to subscribe to, e.g. foo.bar</li>
<li><code>qGroup</code>: Optional queue group</li>
<li><code>inbox</code>: Inbox subject to deliver messages on</li>
<li><code>maxInFlight</code>: Maximum inflight messages without an acknowledgement allowed</li>
<li><code>ackWaitInSecs</code>: Timeout for receiving an acknowledgement from the client</li>
<li><code>durableName</code>: Optional durable name which survives client restarts</li>
<li><code>startPosition</code>: An enumerated type specifying the point in history to start replaying data</li>
<li><code>startSequence</code>: Optional start sequence number</li>
<li><code>startTimeDelta</code>: Optional start time</li>
</ul>
<h4 id="startposition-enumeration">StartPosition enumeration</h4>
<ul>
<li><code>NewOnly</code>: Send only new messages</li>
<li><code>LastReceived</code>: Send only the last received message</li>
<li><code>TimeDeltaStart</code>: Send messages from duration specified in the <code>startTimeDelta</code> field.</li>
<li><code>SequenceStart</code>: Send messages starting from the sequence in the <code>startSequence</code> field.</li>
<li><code>First</code>: Send all available messages</li>
</ul>
<h2 id="subscriptionresponse"><a name="SUBRESP"></a>SubscriptionResponse</h2>
<h4 id="description">Description</h4>
<p>The <code>SubscriptionResponse</code> message is the response from the <code>SubscriptionRequest</code>. After a client has processed an incoming <a href="#MSGPROTO">MsgProto</a> message, it must send an acknowledgement to the <code>ackInbox</code> subject provided here.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>ackInbox</code>: subject the client sends message acknowledgements to the NATS Streaming Server</li>
<li><code>error</code>: error string, empty/omitted if no error</li>
</ul>
<h2 id="unsubscriberequest"><a name="UNSUBREQ"></a>UnsubscribeRequest</h2>
<h4 id="description">Description</h4>
<p>The <code>UnsubscribeRequest</code> unsubcribes the connection from the specified subject. The inbox specified is the <code>inbox</code> returned from the NATS Streaming Server in the <code>SubscriptionResponse</code>.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>clientID</code>: Client ID originally provided in the <a href="#CONNREQ">ConnectRequest</a></li>
<li><code>subject</code>: Subject for the subscription</li>
<li><code>inbox</code>: Inbox subject to identify subscription</li>
<li><code>durableName</code>: Optional durable name which survives client restarts</li>
</ul>
<h2 id="pubmsg"><a name="PUBMSG"></a>PubMsg</h2>
<h4 id="description">Description</h4>
<p>The <code>PubMsg</code> protocol message is published from a client to the NATS Streaming Server. The GUID must be unique, and is returned in the <a href="#PUBACK">PubAck</a> message to correlate the success or failure of storing this particular message.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>clientID</code>: Client ID originally provided in the <a href="#CONNREQ">ConnectRequest</a></li>
<li><code>guid</code>: a guid generated for this particular message</li>
<li><code>subject</code>: subject</li>
<li><code>reply</code>: optional reply subject</li>
<li><code>data</code>: payload</li>
<li><code>sha256</code>: optional sha256 of payload data</li>
</ul>
<h2 id="puback"><a name="PUBACK"></a>PubAck</h2>
<h4 id="description">Description</h4>
<p>The <code>PubAck</code> message is an acknowledgement from the NATS Streaming Server that a message has been processed. The message arrives on the subject specified on the reply subject of the NATS message the <code>PubMsg</code> was published on. The GUID is the same GUID used in the <code>PubMsg</code> being acknowledged. If an error string is present, the message was not persisted by the NATS Streaming Server and no guarantees regarding persistence are honored. <code>PubAck</code> messages may be handled asynchronously from their corresponding <code>PubMsg</code> in the client.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>guid</code>: GUID of the message being acknowledged by the NATS Streaming Server</li>
<li><code>error</code>: An error string, empty/omitted if no error</li>
</ul>
<h2 id="msgproto"><a name="MSGPROTO"></a>MsgProto</h2>
<h4 id="description">Description</h4>
<p>The <code>MsgProto</code> message is received by client from the NATS Streaming Server, containing the payload of messages sent by a publisher. A <code>MsgProto</code> message that is not acknowledged with an <a href="#ACK">Ack</a> message within the duration specified by the <code>ackWaitInSecs</code> field of the subscription request will be redelivered.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>sequence</code>: Globally ordered sequence number for the subject&apos;s channel</li>
<li><code>subject</code>: Subject</li>
<li><code>reply</code>: Optional reply</li>
<li><code>data</code>: Payload</li>
<li><code>timestamp</code>: Time the message was stored in the server.</li>
<li><code>redelivered</code>: Flag specifying if the message is being redelivered</li>
<li><code>CRC32</code>: Optional IEEE CRC32</li>
</ul>
<h2 id="ack"><a name="ACK"></a>Ack</h2>
<h4 id="description">Description</h4>
<p>An <code>Ack</code> message is an acknowledgement from the client that a <a href="#MSGPROTO">MsgProto</a> message has been considered received. It is published to the <code>ackInbox</code> field of the <a href="#SUBRESP"><code>SubscriptionResponse</code></a>.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>subject</code>: Subject of the message being acknowledged</li>
<li><code>sequence</code>: Sequence of the message being acknowledged</li>
</ul>
<h2 id="closerequest"><a name="CLOSEREQ"></a>CloseRequest</h2>
<h4 id="description">Description</h4>
<p>A <code>CloseRequest</code> message is published on the <code>closeRequests</code> subject from the <a href="#CONNRESP"><code>ConnectResponse</code></a>, and notifies the NATS Streaming Server that the client connection is closing, allowing the server to free up resources. This message should <em>*always</em>- be sent when a client is finished using a connection.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>clientID</code>: Client ID originally provided in the <a href="#CONNREQ">ConnectRequest</a></li>
</ul>
<h2 id="closeresponse"><a name="CLOSERESP"></a>CloseResponse</h2>
<h4 id="description">Description</h4>
<p>The <code>CloseResponse</code> is sent by the NATS Streaming Server on the reply subject of the <code>CloseRequest</code> NATS message. This response contains any error that may have occurred with the corresponding close call.</p>
<h4 id="message-structure">Message Structure</h4>
<ul>
<li><code>error</code>: error string, empty/omitted if no error</li>
</ul>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="nats-streaming-tls.html" class="navigation navigation-prev " aria-label="Previous page: Securing">
<i class="fa fa-angle-left"></i>
</a>
<a href="nats-streaming-swarm.html" class="navigation navigation-next " aria-label="Next page: Docker Swarm">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Protocol","level":"3.3","depth":1,"next":{"title":"Docker Swarm","level":"3.4","depth":1,"path":"nats_streaming/nats-streaming-swarm.md","ref":"nats_streaming/nats-streaming-swarm.md","articles":[]},"previous":{"title":"Securing","level":"3.2.1","depth":2,"path":"nats_streaming/nats-streaming-tls.md","ref":"nats_streaming/nats-streaming-tls.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prism","-highlight","include-html","toggle-chapters"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{"lang":{"ascii":"markup","text":"markup"}},"include-html":{},"toggle-chapters":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"The NATS Maintainers","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"NATS","gitbook":"*","description":"Administrative, developer and conceptual documentation for the NATS messaging system."},"file":{"path":"nats_streaming/nats-streaming-protocol.md","mtime":"2019-05-15T20:58:04.216Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-20T22:00:46.477Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>
<!-- Viz Support -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/viz.js/2.1.2/viz.js"> </script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/viz.js/2.1.2/lite.render.js"> </script>
<!-- Site code -->
<script>
function flash(elem, text, speed) {
if (!elem) {
return;
}
var s = elem.style;
elem.textContent = text;
s.display = 'block';
s.opacity = 1;
(function fade() {
(s.opacity -= .1) < .1 ? s.display = "none" : setTimeout(fade, speed)
})();
}
function copyToClipboard(text, el) {
var copyTest = document.queryCommandSupported('copy');
var elOriginalText = el.getAttribute('data-original-title');
if (copyTest === true) {
var copyTextArea = document.createElement("textarea");
copyTextArea.value = text;
document.body.appendChild(copyTextArea);
copyTextArea.select();
try {
var successful = document.execCommand('copy');
var msg = successful ? 'Copied!' : 'Whoops, not copied!';
var parent = el.parentNode.parentNode;
var msgElem = parent.querySelector(".copy-msg");
flash(msgElem, msg, 100);
} catch (err) {
console.log('Oops, unable to copy', err);
}
document.body.removeChild(copyTextArea);
el.setAttribute('data-original-title', elOriginalText);
} else {
// Fallback if browser doesn't support .execCommand('copy')
window.prompt("Copy to clipboard: Ctrl+C or Command+C, Enter", text);
}
}
function processGraphVizSections(elements) {
var elements = document.querySelectorAll("[data-viz]");
var viz = new Viz();
Array.prototype.forEach.call(elements, function (x) {
var engine = x.getAttribute("data-viz");
var image = viz.renderImageElement(x.innerText, {
format: "png",
engine: engine
}).then(function (element) {
x.parentNode.insertBefore(element, x);
});
});
};
function updateLanguageParameter(value) {
const param = "lang";
if (window.location.href.indexOf("?") >= 0) {
const regExp = new RegExp(param + "(.+?)(&|$)", "g");
const newUrl = window.location.href.replace(regExp, param + "=" + encodeURIComponent(value) + "$2");
window.history.pushState("", "", newUrl);
} else {
const newUrl = window.location.href + "?" + param + "=" + encodeURIComponent(value);
window.history.pushState("", "", newUrl);
}
}
function getLanguageParameter() {
var match = RegExp('[?&]lang=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
function docReady() {
window.gitbook.events.bind("page.change", function () {
pageChanged();
});
}
function pageChanged() {
document.querySelectorAll('.js-copy').forEach(elem => {
elem.addEventListener("click", function () {
var el = this;
var parent = this.parentNode.parentNode;
var code = parent.querySelector('code');
var text = code.textContent || code.innerText;
copyToClipboard(text, el);
})
});
document.querySelectorAll('.api-lang').forEach(elem => {
elem.addEventListener("click", function () {
var curLang = sessionStorage.getItem('nats-api-language');
var lang = this.getAttribute('data-language');
// Stop the infinite loop
if (curLang == lang) {
return;
}
sessionStorage.setItem('nats-api-language', lang); // So we only do this 1x
updateLanguageParameter(lang)
document.querySelectorAll('.api-lang[data-language=' + lang + ']').forEach(elem => {
elem.click();
});
})
});
if (sessionStorage) {
var curLang = sessionStorage.getItem('nats-api-language');
var queryLang = getLanguageParameter();
var lang = curLang;
if (queryLang) { // query takes precedent
lang = queryLang
}
if (lang) {
document.querySelectorAll('.api-lang[data-language=' + lang + ']').forEach(elem => {
elem.click();
});
}
}
setTimeout(function () {
processGraphVizSections();
}, 1);
}
if (document.readyState != 'loading') docReady();
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', docReady);
else document.attachEvent('onreadystatechange', function () {
if (document.readyState == 'complete') docReady();
});
</script>
<!-- Github Buttons -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<!-- Styles -->
<style>
div.graphviz {
background: transparent;
border: 0;
padding-top: 15px;
padding-right: 15px;
padding-bottom: 25px;
padding-left: 15px;
text-align: center;
}
code[data-viz] {
display: none;
}
.tab-wrap {
transition: 0.3s box-shadow ease;
border-radius: 6px;
max-width: 100%;
display: flex;
flex-wrap: wrap;
position: relative;
list-style: none;
background-color: #fff;
margin: 20px 0;
/* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);*/
}
.tab-wrap:hover {
box-shadow: 0 12px 23px rgba(0, 0, 0, 0.23), 0 10px 10px rgba(0, 0, 0, 0.19);
}
.tab {
display: none;
}
/* Using scss these would be generated, we have to manually create enough for all tabs, start with 8 */
.tab:checked:nth-of-type(1)~.tab__content:nth-of-type(1) {
opacity: 1;
transition: 0.5s opacity ease-in, 0.8s -webkit-transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease, 0.8s -webkit-transform ease;
position: relative;
top: 0;
z-index: 100;
-webkit-transform: translateY(0px);
transform: translateY(0px);
text-shadow: 0 0 0;
}
.tab:checked:nth-of-type(2)~.tab__content:nth-of-type(2) {
opacity: 1;
transition: 0.5s opacity ease-in, 0.8s -webkit-transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease, 0.8s -webkit-transform ease;
position: relative;
top: 0;
z-index: 100;
-webkit-transform: translateY(0px);
transform: translateY(0px);
text-shadow: 0 0 0;
}
.tab:checked:nth-of-type(3)~.tab__content:nth-of-type(3) {
opacity: 1;
transition: 0.5s opacity ease-in, 0.8s -webkit-transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease, 0.8s -webkit-transform ease;
position: relative;
top: 0;
z-index: 100;
-webkit-transform: translateY(0px);
transform: translateY(0px);
text-shadow: 0 0 0;
}
.tab:checked:nth-of-type(4)~.tab__content:nth-of-type(4) {
opacity: 1;
transition: 0.5s opacity ease-in, 0.8s -webkit-transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease, 0.8s -webkit-transform ease;
position: relative;
top: 0;
z-index: 100;
-webkit-transform: translateY(0px);
transform: translateY(0px);
text-shadow: 0 0 0;
}
.tab:checked:nth-of-type(5)~.tab__content:nth-of-type(5) {
opacity: 1;
transition: 0.5s opacity ease-in, 0.8s -webkit-transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease, 0.8s -webkit-transform ease;
position: relative;
top: 0;
z-index: 100;
-webkit-transform: translateY(0px);
transform: translateY(0px);
text-shadow: 0 0 0;
}
.tab:checked:nth-of-type(6)~.tab__content:nth-of-type(6) {
opacity: 1;
transition: 0.5s opacity ease-in, 0.8s -webkit-transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease, 0.8s -webkit-transform ease;
position: relative;
top: 0;
z-index: 100;
-webkit-transform: translateY(0px);
transform: translateY(0px);
text-shadow: 0 0 0;
}
.tab:checked:nth-of-type(7)~.tab__content:nth-of-type(7) {
opacity: 1;
transition: 0.5s opacity ease-in, 0.8s -webkit-transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease, 0.8s -webkit-transform ease;
position: relative;
top: 0;
z-index: 100;
-webkit-transform: translateY(0px);
transform: translateY(0px);
text-shadow: 0 0 0;
}
.tab:checked:nth-of-type(8)~.tab__content:nth-of-type(8) {
opacity: 1;
transition: 0.5s opacity ease-in, 0.8s -webkit-transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease;
transition: 0.5s opacity ease-in, 0.8s transform ease, 0.8s -webkit-transform ease;
position: relative;
top: 0;
z-index: 100;
-webkit-transform: translateY(0px);
transform: translateY(0px);
text-shadow: 0 0 0;
}
.tab:first-of-type:not(:last-of-type)+label {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.tab:not(:first-of-type):not(:last-of-type)+label {
border-radius: 0;
}
.tab:last-of-type:not(:first-of-type)+label {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.tab:checked+label {
background-color: #fff;
box-shadow: 0 -1px 0 #fff inset;
cursor: default;
font-weight: bold;
border: 1px solid #ddd;
border-bottom-color: transparent;
}
.tab:checked+label:hover {
box-shadow: 0 -1px 0 #fff inset;
background-color: #fff;
}
.tab+label {
box-shadow: 0 -1px 0 #eee inset;
border-radius: 6px 6px 0 0;
cursor: pointer;
display: block;
text-decoration: none;
color: #27aae1;
flex-grow: 3;
text-align: center;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
transition: 0.3s background-color ease, 0.3s box-shadow ease;
height: 50px;
box-sizing: border-box;
padding: 15px;
}
.tab+label:hover {
background-color: #f9f9f9;
box-shadow: 0 1px 0 #f4f4f4 inset;
}
.tab__content {
padding: 2px 2px;
background-color: transparent;
position: absolute;
width: 100%;
z-index: -1;
opacity: 0;
left: 0;
-webkit-transform: translateY(-3px);
transform: translateY(-3px);
border-radius: 6px;
}
.tab__content pre {
margin-bottom: 0px !important;
}
.toolbar-icons {
display: inline-block;
position: relative;
padding-left: 4px;
}
a.toolbar-icons {
text-decoration: none;
}
.toolbar-icons .mdi {
color: #4183c4;
}
.copy-msg {
color: #4183c4;
}
.pull-right {
float: right !important;
}
.pull-left {
float: left !important;
}
</style>
<script src="../gitbook/gitbook.js"></script>
<script src="../gitbook/theme.js"></script>
<script src="../gitbook/gitbook-plugin-toggle-chapters/toggle.js"></script>
<script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="../gitbook/gitbook-plugin-search/search.js"></script>
<script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>