<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>Delay Queue - Tag - HEJTAO</title>
        <link>https://hejtao.netlify.app/tags/delay-queue/</link>
        <description>Delay Queue - Tag - HEJTAO</description>
        <generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 21 Oct 2020 00:00:00 &#43;0000</lastBuildDate><atom:link href="https://hejtao.netlify.app/tags/delay-queue/" rel="self" type="application/rss+xml" /><item>
    <title>Build a Delay Queue with Redis</title>
    <link>https://hejtao.netlify.app/posts/cs-delay-queue/</link>
    <pubDate>Wed, 21 Oct 2020 00:00:00 &#43;0000</pubDate>
    <author>HEJTAO.COM</author>
    <guid>https://hejtao.netlify.app/posts/cs-delay-queue/</guid>
    <description><![CDATA[delay queue block diagram by YouZan Job type Job struct { Id string `json:&#34;id&#34;` Topic string `json:&#34;topic&#34;` Delay int64 `json:&#34;delay&#34;` TTR int64 `json:&#34;ttr&#34;` // time to run, guarantee reliability Body string `json:&#34;body&#34;` // service data } Job Pool Redis hash
job&rsquo;s Id $ \rightarrow $ hash key
meta data of the job $ \rightarrow $ hash value
// poolAdd add the job hash func poolAdd(jobId string, data []byte) error { return rdb.]]></description>
</item>
</channel>
</rss>
