Branching ratios and absolute cross sections have been measured for the dissociative recombination of DCCCN+ and DCCCND+ using the CRYRING ion storage ring. In the case of DCCCN+ the dissociation yielding D + C3N and those leading to two fragments containing a pair of heavy atoms dominate, whereas pathways producing a fragment with three heavy atoms play only a minor role. Conversely, for DCCCND+, only those channels preserving the carbon chain or producing two fragments with a pair of heavy atoms each are detected. The cross sections of the reactions are very similar and can be fitted to the expressions sigma = (2.9 +/- 0.5) x 10(-15)E(eV)(-1.05 +/- 0.02) cm(2) and sigma = (2.3 +/- 0.4) x 10(-15)E(eV)(-1.10 +/- 0.02) cm(2) for DCCCN+ and DCCCND+, respectively. From these data, thermal reaction rates of k(T) = (1.5 +/- 0.3) x 10(-6)(T/300 K)(-0.60 +/- 0.02) cm(3) s(-1) and k(T) = (1.5 +/- 0.3) x 10(-6)(T/300 K)(-0.58 +/- 0.02) cm(3) s(-1) were calculated for DCCCN+ and DCCCND+, respectively. These rates and branching ratios are compared with those hitherto used in astrophysical models.