Solution (source code)

= Solution

By <Poisson-gamma conjugacy>, the <posterior density> is proportional to
$$
\lambda^{a-1}e^{-b\lambda}\lambda^n e^{-T\lambda}
=\lambda^{a+n-1}e^{-(b+T)\lambda}.
$$
Thus \b[the shape-rate posterior is]
$$
\boxed{\lambda\mid\mathcal D\sim\operatorname{Gamma}(A,B),\quad A=a+n,\quad B=b+T.}
$$
Its <posterior mean> is $A/B$ and its <variance> is $A/B^2$. The parameter $B$ is a rate, rather than a scale.